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

HLSL: reject-valid: Expected Image Operand Bias to be float scalar #2757

Closed
Ace17 opened this issue Sep 16, 2021 · 0 comments · Fixed by #2762
Closed

HLSL: reject-valid: Expected Image Operand Bias to be float scalar #2757

Ace17 opened this issue Sep 16, 2021 · 0 comments · Fixed by #2762

Comments

@Ace17
Copy link

Ace17 commented Sep 16, 2021

The following program is accepted by fxc.exe :

( http://shader-playground.timjones.io/a7903c733ae2ef2ef279ebbb62bcb539 )

Texture2D myTexture;
SamplerState mySampler;

float4 main() : SV_Target0
{
    return myTexture.SampleBias(mySampler, float2(0, 0), 0, 0);
}

However, it is rejected by glslangValidator:

$ glslangValidator -V100 --spirv-val -S frag -D --target-env vulkan1.0 input.frag.hlsl -e main
/tmp/input.frag.hlsl
error: SPIRV-Tools Validation Errors
error: Expected Image Operand Bias to be float scalar
  %40 = OpImageSampleImplicitLod %v4float %39 %23 Bias|ConstOffset %27 %float_0
greg-lunarg added a commit to greg-lunarg/glslang that referenced this issue Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant