-
Notifications
You must be signed in to change notification settings - Fork 714
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
[SPIR-V] Access violation error while parsing the shader #6689
Comments
AFAIK Anyway in order for your shader to compile you need to declare the combined sampler twice, and probably use |
Hmm, got it. Because I wanted to do something like this:
But, I saw, that I should use Texture2DArray and one sampler and vk::combinedImageSampler. So, then, if it is deprecated, then, the example in the wiki should not be correct anymore? I am confused about the right way to do it with the modern versions |
I think there's a bug about arrays of combined image samplers #5092 This made us support separate samplers in our engine. |
I want to deprecate |
The problem is not related to the texture samplers. The problem is that the HLSL is invalid, and the SPIR-V backend is not catching the problem. You error is still there even if I remove the combinedtexturesampler attributes. If I compile the shader for DXIL, it gives the proper error:
The last two parameters to this function call are
This is invalid spir-v, and cause the optimizer to fail. This fix for this will be to try to add a more meaningful error message, but the test given above will never work. You code will have to be changed. |
When processing the GetDimension member function for textures, we do not emit an error if the output variable is not an l-value. This change will add this error. Fixes microsoft#6689
When processing the GetDimension member function for textures, we do not emit an error if the output variable is not an l-value. This change will add this error. Fixes #6689
I've got an issue while doing my shader. The shader had Texture2DArray and TextureCubeArray combined with samplers. The issue is that I've got this error:
Exception thrown: read access violation.
this was nullptr.
On this line:
My shader for this case, I've tried to reproduce the issue with:
One thing is that shader cannot be compiled with both usage of Texture2DArray functions. But, if I remove one of those, it will.
I am compiling this shader with this command:
dxc -spirv -E main -T cs_6_6 ..\shader.comp.hlsl
The text was updated successfully, but these errors were encountered: