Implement GL_EXT_fragment_invocation_density

including SPV generation using SPV_EXT_fragment_invocation_density.
This is an alias of the functionality in SPV_NV_shading_rate, and thus in some
cases we can only have one set of the tokens present (switch statements), so
we have picked the EXT version. This required updating the expected test
results for SPV_NV_shading_rate.

Also updated the known-good for spirv-headers so that the validator in
spirv-tools knows about the new extension.
This commit is contained in:
Daniel Koch 2018-11-26 10:01:58 -05:00
parent 83fe01e274
commit 5154db5183
18 changed files with 215 additions and 12 deletions

View file

@ -4,7 +4,7 @@ spv.shadingRate.frag
// Id's are bound by 21
Capability Shader
Capability ShadingRateNV
Capability FragmentDensityEXT
Extension "SPV_NV_shading_rate"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@ -19,10 +19,10 @@ spv.shadingRate.frag
Name 19 "gl_InvocationsPerPixelNV"
Decorate 9(FragmentSize) Location 0
Decorate 13(gl_FragmentSizeNV) Flat
Decorate 13(gl_FragmentSizeNV) BuiltIn FragmentSizeNV
Decorate 13(gl_FragmentSizeNV) BuiltIn FragSizeEXT
Decorate 17(InvocationsPerPixel) Location 2
Decorate 19(gl_InvocationsPerPixelNV) Flat
Decorate 19(gl_InvocationsPerPixelNV) BuiltIn InvocationsPerPixelNV
Decorate 19(gl_InvocationsPerPixelNV) BuiltIn FragInvocationCountEXT
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32