-
Notifications
You must be signed in to change notification settings - Fork 168
SetInlineConstants support for OpenGL #753
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
SetInlineConstants support for OpenGL #753
Conversation
…Failed to link program 0 for pipeline state 'Render State Cache Test': error: buffer block with binding `0' has mismatching definitions See DiligentGraphics#753
…Failed to link program 0 for pipeline state 'Render State Cache Test': error: buffer block with binding `0' has mismatching definitions See DiligentGraphics#753
| if (!Options.separate_shader_objects) | ||
| { | ||
| // We do not emit binding qualifiers when separate_shader_objects disable. | ||
| // Let OpenGL driver do the binding qualifiers allocation. | ||
| Options.version = 410; | ||
| Options.enable_420pack_extension = false; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed for inline constants?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to reproduce this issue?
I commented this out, but all tests still pass with both separable and non-separable programs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVM, stale build files. Yes, it reproduces without this fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why does this only fail with non-separable programs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it was because there was no kind of VS-PS combination in test shaders that:
VS with references to cbufferA+cbufferB,
PS with references to only cbufferA.
until we introduced InlineConstantsTests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you create a unit test that reproduces this issue? The fix should be merged to main as it is not related to inline constants - can you submit a PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new unittest should be in ArchiveTest or ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ArchiveTest, or RenderStateCacheTest.
Maybe RenderStateCacheTest is better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #754
Graphics/GraphicsEngineOpenGL/src/PipelineResourceSignatureGLImpl.cpp
Outdated
Show resolved
Hide resolved
Graphics/GraphicsEngineOpenGL/include/PipelineResourceSignatureGLImpl.hpp
Outdated
Show resolved
Hide resolved
Graphics/GraphicsEngineOpenGL/include/PipelineResourceSignatureGLImpl.hpp
Outdated
Show resolved
Hide resolved
Graphics/GraphicsEngineOpenGL/src/PipelineResourceSignatureGLImpl.cpp
Outdated
Show resolved
Hide resolved
Graphics/GraphicsEngineOpenGL/src/PipelineResourceSignatureGLImpl.cpp
Outdated
Show resolved
Hide resolved
Graphics/GraphicsEngineOpenGL/include/ShaderResourceCacheGL.hpp
Outdated
Show resolved
Hide resolved
|
Funny that it took a month to implement inline constants in Vulkan, and a day to implement them in GL |
|
@TheMostDiligent We have similar issue with Cross-Signature Commit in vulkan impl too, the GL impl has been fixed in f747b23 All reviews above have been fixed, except for the |
…Failed to link program 0 for pipeline state 'Render State Cache Test': error: buffer block with binding `0' has mismatching definitions See DiligentGraphics#753
f6d3f6a to
2f82b00
Compare
61e2b46 to
380f498
Compare
2f82b00 to
cf85a48
Compare
cf85a48 to
820adc3
Compare
820adc3
into
DiligentGraphics:inline_constants
Build plan: SetInlineConstantsGL
InlineConstantBufferAttribsGLstructureCreateLayout(useGetArraySize()) and create shared bufferShaderResourceCacheGLfor inline constant stagingShaderVariableManagerGL::SetConstantsDeviceContextGLImpl(graphics + compute)0has mismatching definitions fromRenderStateCachetest. see comment later.