Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLES: Add Support for Separable Programs #1563

Closed
danginsburg opened this issue Jan 18, 2018 · 5 comments
Closed

GLES: Add Support for Separable Programs #1563

danginsburg opened this issue Jan 18, 2018 · 5 comments
Assignees

Comments

@danginsburg
Copy link

This may just be a question, but is possibly a bug. When I replay in GAPID I see a bunch of errors on calls to glBindBufferRange to GL_UNIFORM_BUFFER of GL_INVALID_VALUE.

I am wondering, does GAPID replay on the local machine and does it handle different values for GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT? In this case the device is an Adreno 530 with GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 32, although I'm running on NVIDIA which has GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 256.

I don't see the glBindBufferRange errors when I run on the device (I call glGetError after each call), but I do on the replay. I also see GL_INVALID_OPERATION errors on the device in glDrawElementsInstanced but not in the replay, which makes me wonder if it's because it's replaying locally.

@ben-clayton
Copy link
Contributor

Hi @danginsburg,

Sorry for the slow reply - we're coming to the end of a manic couple of weeks and now I'm playing catchup on my inbox.

Yes, this sounds like a replay bug - thank you for reporting it. We do actually try to handle this explicit case, so I'm curious why the compatability code isn't working.

I don't suppose you have a simple app or .gfxtrace file that exhibits this issue that you can share with me?

Cheers,
Ben

@danginsburg
Copy link
Author

@ben-clayton Please find attached a gfxtrace that demonstrates the problem.
rendersystemtest_20180118_1115.zip

@ben-clayton
Copy link
Contributor

Hi @danginsburg,

First - apologies for the lengthy delay in looking into this. I've been fully occupied trying to sort out stuff that will unblock the next release.

I looked into this trace, and there were a number of issues I uncovered:

  1. A couple of your shaders were failing to compile as they were missing some precision qualifiers. I could fix these up in the shader editor and I got those errors to disappear.
  2. You were right that glBindBufferRange was causing bad replay (but not that particular command for me). There was a TODO in our compat for handling an unaligned buffer update while it was bound. I've now implemented this, and I'll put the PR up for review tomorrow.
  3. glDrawBuffer was also not being handled correctly in our compat. I also have a fix for this.
  4. One of the contexts in this trace was created without the interceptor seeing it. This is scary. What device did you trace this on?
  5. It looks like you are using separable programs. Unfortunately we do not support this yet, so it's unlikely to work. I couldn't determine if this was a real problem due to 4.

Is there any possibility of sending me the APK? No problem if you cannot.

Cheers,
Ben

@danginsburg
Copy link
Author

  1. One of the contexts in this trace was created without the interceptor seeing it. This is scary. What device did you trace this on?

I don't recall for sure which trace I sent you, but it was either an NVIDIA Tegra K1 or Samsung S7.

  1. It looks like you are using separable programs. Unfortunately we do not support this yet, so it's unlikely to work. I couldn't determine if this was a real problem due to 4.

Yeah, our engine requires separable programs.

Is there any possibility of sending me the APK? No problem if you cannot.

Unfortunately, no. It's not so much that I can't share it as that it requires some streaming bootstrap stuff and isn't easily to package into an APK that would run for you by itself.

ben-clayton added a commit to ben-clayton/gapid that referenced this issue Mar 15, 2018
We have to jump through hoops to support replaying on targets where the
minimum uniform alignment is smaller than the trace target.

There was a TODO for handling the case where the buffer is kept bound
while the buffer is updated. This CL fixes this case.

Issue: google#1563
ben-clayton added a commit to ben-clayton/gapid that referenced this issue Mar 16, 2018
We have to jump through hoops to support replaying on targets where the
minimum uniform alignment is smaller than the trace target.

There was a TODO for handling the case where the buffer is kept bound
while the buffer is updated. This CL fixes this case.

Issue: google#1563
ben-clayton added a commit that referenced this issue Mar 16, 2018
We have to jump through hoops to support replaying on targets where the
minimum uniform alignment is smaller than the trace target.

There was a TODO for handling the case where the buffer is kept bound
while the buffer is updated. This CL fixes this case.

Issue: #1563
@AWoloszyn AWoloszyn changed the title glBindBufferRange GL_INVALID_VALUE error on replay, but not on device? GLES: Add Support for Separable Programs Oct 30, 2018
@AWoloszyn
Copy link
Contributor

Tracked by #1745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants