mirror of
https://github.com/KhronosGroup/glslang
synced 2024-09-19 12:19:53 +00:00
For bug #2580: sparseTextureGatherOffsetsARB should only take constant offsets.
This commit is contained in:
parent
2c7c84c8ac
commit
18cfc3f106
@ -48,6 +48,31 @@ void foo()
|
|||||||
float f = imageAtomicExchange(i2dmsa, ivec3(in3), 2, 4.5);
|
float f = imageAtomicExchange(i2dmsa, ivec3(in3), 2, 4.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#extension GL_ARB_sparse_texture2: enable
|
||||||
|
|
||||||
|
uniform sampler2D s2D;
|
||||||
|
uniform isampler2DArray is2DArray;
|
||||||
|
uniform sampler2DRectShadow s2DRectShadow;
|
||||||
|
|
||||||
|
in flat ivec2 offsets[4];
|
||||||
|
in vec2 c2;
|
||||||
|
in vec3 c3;
|
||||||
|
|
||||||
|
void testOffsets()
|
||||||
|
{
|
||||||
|
vec4 texel = vec4(0.0);
|
||||||
|
ivec4 itexel = ivec4(0);
|
||||||
|
const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
|
||||||
|
sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel);
|
||||||
|
sparseTextureGatherOffsetsARB(is2DArray, c3, constOffsets, itexel, 2);
|
||||||
|
sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, constOffsets, texel);
|
||||||
|
|
||||||
|
sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel); // Error : Non constant offsets
|
||||||
|
sparseTextureGatherOffsetsARB(is2DArray, c3, offsets, itexel, 2); // Error : Non constant offsets
|
||||||
|
sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel); // Error : Non constant offsets
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
in float gl_CullDistance[6];
|
in float gl_CullDistance[6];
|
||||||
|
|
||||||
float cull(int i)
|
float cull(int i)
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
450.frag
|
450.frag
|
||||||
ERROR: 0:63: 'location' : cannot use in a block array where new locations are needed for each block element
|
ERROR: 0:70: 'offsets' : argument must be compile-time constant
|
||||||
ERROR: 0:68: 'early_fragment_tests' : can only apply to a standalone qualifier
|
ERROR: 0:71: 'offsets' : argument must be compile-time constant
|
||||||
ERROR: 2 compilation errors. No code generated.
|
ERROR: 0:72: 'offsets' : argument must be compile-time constant
|
||||||
|
ERROR: 0:88: 'location' : cannot use in a block array where new locations are needed for each block element
|
||||||
|
ERROR: 0:93: 'early_fragment_tests' : can only apply to a standalone qualifier
|
||||||
|
ERROR: 5 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 450
|
Shader version: 450
|
||||||
|
Requested GL_ARB_sparse_texture2
|
||||||
ERROR: node is still EOpNull!
|
ERROR: node is still EOpNull!
|
||||||
0:8 Function Definition: main( ( global void)
|
0:8 Function Definition: main( ( global void)
|
||||||
0:8 Function Parameters:
|
0:8 Function Parameters:
|
||||||
@ -133,26 +137,107 @@ ERROR: node is still EOpNull!
|
|||||||
0:48 2 (const int)
|
0:48 2 (const int)
|
||||||
0:48 Constant:
|
0:48 Constant:
|
||||||
0:48 4.500000
|
0:48 4.500000
|
||||||
0:53 Function Definition: cull(i1; ( global float)
|
0:61 Function Definition: testOffsets( ( global void)
|
||||||
0:53 Function Parameters:
|
0:61 Function Parameters:
|
||||||
0:53 'i' ( in int)
|
0:63 Sequence
|
||||||
0:55 Sequence
|
0:63 Sequence
|
||||||
0:55 Branch: Return with expression
|
0:63 move second child to first child ( temp 4-component vector of float)
|
||||||
0:55 Test condition and select ( temp float)
|
0:63 'texel' ( temp 4-component vector of float)
|
||||||
0:55 Condition
|
0:63 Constant:
|
||||||
0:55 Compare Greater Than or Equal ( temp bool)
|
0:63 0.000000
|
||||||
0:55 'i' ( in int)
|
0:63 0.000000
|
||||||
0:55 Constant:
|
0:63 0.000000
|
||||||
0:55 6 (const int)
|
0:63 0.000000
|
||||||
0:55 true case
|
0:64 Sequence
|
||||||
0:55 direct index ( smooth temp float CullDistance)
|
0:64 move second child to first child ( temp 4-component vector of int)
|
||||||
0:55 'gl_CullDistance' ( smooth in 6-element array of float CullDistance)
|
0:64 'itexel' ( temp 4-component vector of int)
|
||||||
0:55 Constant:
|
0:64 Constant:
|
||||||
0:55 5 (const int)
|
0:64 0 (const int)
|
||||||
0:55 false case
|
0:64 0 (const int)
|
||||||
0:55 indirect index ( smooth temp float CullDistance)
|
0:64 0 (const int)
|
||||||
0:55 'gl_CullDistance' ( smooth in 6-element array of float CullDistance)
|
0:64 0 (const int)
|
||||||
0:55 'i' ( in int)
|
0:66 sparseTextureGatherOffsets ( global int)
|
||||||
|
0:66 's2D' ( uniform sampler2D)
|
||||||
|
0:66 'c2' ( smooth in 2-component vector of float)
|
||||||
|
0:66 Constant:
|
||||||
|
0:66 1 (const int)
|
||||||
|
0:66 2 (const int)
|
||||||
|
0:66 3 (const int)
|
||||||
|
0:66 4 (const int)
|
||||||
|
0:66 15 (const int)
|
||||||
|
0:66 16 (const int)
|
||||||
|
0:66 -2 (const int)
|
||||||
|
0:66 0 (const int)
|
||||||
|
0:66 'texel' ( temp 4-component vector of float)
|
||||||
|
0:67 sparseTextureGatherOffsets ( global int)
|
||||||
|
0:67 'is2DArray' ( uniform isampler2DArray)
|
||||||
|
0:67 'c3' ( smooth in 3-component vector of float)
|
||||||
|
0:67 Constant:
|
||||||
|
0:67 1 (const int)
|
||||||
|
0:67 2 (const int)
|
||||||
|
0:67 3 (const int)
|
||||||
|
0:67 4 (const int)
|
||||||
|
0:67 15 (const int)
|
||||||
|
0:67 16 (const int)
|
||||||
|
0:67 -2 (const int)
|
||||||
|
0:67 0 (const int)
|
||||||
|
0:67 'itexel' ( temp 4-component vector of int)
|
||||||
|
0:67 Constant:
|
||||||
|
0:67 2 (const int)
|
||||||
|
0:68 sparseTextureGatherOffsets ( global int)
|
||||||
|
0:68 's2DRectShadow' ( uniform sampler2DRectShadow)
|
||||||
|
0:68 'c2' ( smooth in 2-component vector of float)
|
||||||
|
0:68 Constant:
|
||||||
|
0:68 2.000000
|
||||||
|
0:68 Constant:
|
||||||
|
0:68 1 (const int)
|
||||||
|
0:68 2 (const int)
|
||||||
|
0:68 3 (const int)
|
||||||
|
0:68 4 (const int)
|
||||||
|
0:68 15 (const int)
|
||||||
|
0:68 16 (const int)
|
||||||
|
0:68 -2 (const int)
|
||||||
|
0:68 0 (const int)
|
||||||
|
0:68 'texel' ( temp 4-component vector of float)
|
||||||
|
0:70 sparseTextureGatherOffsets ( global int)
|
||||||
|
0:70 's2D' ( uniform sampler2D)
|
||||||
|
0:70 'c2' ( smooth in 2-component vector of float)
|
||||||
|
0:70 'offsets' ( flat in 4-element array of 2-component vector of int)
|
||||||
|
0:70 'texel' ( temp 4-component vector of float)
|
||||||
|
0:71 sparseTextureGatherOffsets ( global int)
|
||||||
|
0:71 'is2DArray' ( uniform isampler2DArray)
|
||||||
|
0:71 'c3' ( smooth in 3-component vector of float)
|
||||||
|
0:71 'offsets' ( flat in 4-element array of 2-component vector of int)
|
||||||
|
0:71 'itexel' ( temp 4-component vector of int)
|
||||||
|
0:71 Constant:
|
||||||
|
0:71 2 (const int)
|
||||||
|
0:72 sparseTextureGatherOffsets ( global int)
|
||||||
|
0:72 's2DRectShadow' ( uniform sampler2DRectShadow)
|
||||||
|
0:72 'c2' ( smooth in 2-component vector of float)
|
||||||
|
0:72 Constant:
|
||||||
|
0:72 2.000000
|
||||||
|
0:72 'offsets' ( flat in 4-element array of 2-component vector of int)
|
||||||
|
0:72 'texel' ( temp 4-component vector of float)
|
||||||
|
0:78 Function Definition: cull(i1; ( global float)
|
||||||
|
0:78 Function Parameters:
|
||||||
|
0:78 'i' ( in int)
|
||||||
|
0:80 Sequence
|
||||||
|
0:80 Branch: Return with expression
|
||||||
|
0:80 Test condition and select ( temp float)
|
||||||
|
0:80 Condition
|
||||||
|
0:80 Compare Greater Than or Equal ( temp bool)
|
||||||
|
0:80 'i' ( in int)
|
||||||
|
0:80 Constant:
|
||||||
|
0:80 6 (const int)
|
||||||
|
0:80 true case
|
||||||
|
0:80 direct index ( smooth temp float CullDistance)
|
||||||
|
0:80 'gl_CullDistance' ( smooth in 6-element array of float CullDistance)
|
||||||
|
0:80 Constant:
|
||||||
|
0:80 5 (const int)
|
||||||
|
0:80 false case
|
||||||
|
0:80 indirect index ( smooth temp float CullDistance)
|
||||||
|
0:80 'gl_CullDistance' ( smooth in 6-element array of float CullDistance)
|
||||||
|
0:80 'i' ( in int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'in1' ( smooth in float)
|
0:? 'in1' ( smooth in float)
|
||||||
0:? 'in2' ( smooth in 2-component vector of float)
|
0:? 'in2' ( smooth in 2-component vector of float)
|
||||||
@ -163,6 +248,12 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'us2dmsa' ( uniform usampler2DMSArray)
|
0:? 'us2dmsa' ( uniform usampler2DMSArray)
|
||||||
0:? 'ii2dms' (layout( rgba32i) uniform iimage2DMS)
|
0:? 'ii2dms' (layout( rgba32i) uniform iimage2DMS)
|
||||||
0:? 'i2dmsa' (layout( rgba32f) uniform image2DMSArray)
|
0:? 'i2dmsa' (layout( rgba32f) uniform image2DMSArray)
|
||||||
|
0:? 's2D' ( uniform sampler2D)
|
||||||
|
0:? 'is2DArray' ( uniform isampler2DArray)
|
||||||
|
0:? 's2DRectShadow' ( uniform sampler2DRectShadow)
|
||||||
|
0:? 'offsets' ( flat in 4-element array of 2-component vector of int)
|
||||||
|
0:? 'c2' ( smooth in 2-component vector of float)
|
||||||
|
0:? 'c3' ( smooth in 3-component vector of float)
|
||||||
0:? 'bInst1' ( in block{layout( location=6) in float f, layout( location=7) in float g, layout( location=8) in 4X4 matrix of float m})
|
0:? 'bInst1' ( in block{layout( location=6) in float f, layout( location=7) in float g, layout( location=8) in 4X4 matrix of float m})
|
||||||
0:? 'bInst2' ( in 3-element array of block{layout( location=12) in float f, layout( location=13) in float g})
|
0:? 'bInst2' ( in 3-element array of block{layout( location=12) in float f, layout( location=13) in float g})
|
||||||
0:? 'f' ( smooth in float)
|
0:? 'f' ( smooth in float)
|
||||||
@ -172,6 +263,7 @@ Linked fragment stage:
|
|||||||
|
|
||||||
|
|
||||||
Shader version: 450
|
Shader version: 450
|
||||||
|
Requested GL_ARB_sparse_texture2
|
||||||
ERROR: node is still EOpNull!
|
ERROR: node is still EOpNull!
|
||||||
0:8 Function Definition: main( ( global void)
|
0:8 Function Definition: main( ( global void)
|
||||||
0:8 Function Parameters:
|
0:8 Function Parameters:
|
||||||
@ -279,6 +371,12 @@ ERROR: node is still EOpNull!
|
|||||||
0:? 'us2dmsa' ( uniform usampler2DMSArray)
|
0:? 'us2dmsa' ( uniform usampler2DMSArray)
|
||||||
0:? 'ii2dms' (layout( rgba32i) uniform iimage2DMS)
|
0:? 'ii2dms' (layout( rgba32i) uniform iimage2DMS)
|
||||||
0:? 'i2dmsa' (layout( rgba32f) uniform image2DMSArray)
|
0:? 'i2dmsa' (layout( rgba32f) uniform image2DMSArray)
|
||||||
|
0:? 's2D' ( uniform sampler2D)
|
||||||
|
0:? 'is2DArray' ( uniform isampler2DArray)
|
||||||
|
0:? 's2DRectShadow' ( uniform sampler2DRectShadow)
|
||||||
|
0:? 'offsets' ( flat in 4-element array of 2-component vector of int)
|
||||||
|
0:? 'c2' ( smooth in 2-component vector of float)
|
||||||
|
0:? 'c3' ( smooth in 3-component vector of float)
|
||||||
0:? 'bInst1' ( in block{layout( location=6) in float f, layout( location=7) in float g, layout( location=8) in 4X4 matrix of float m})
|
0:? 'bInst1' ( in block{layout( location=6) in float f, layout( location=7) in float g, layout( location=8) in 4X4 matrix of float m})
|
||||||
0:? 'bInst2' ( in 3-element array of block{layout( location=12) in float f, layout( location=13) in float g})
|
0:? 'bInst2' ( in 3-element array of block{layout( location=12) in float f, layout( location=13) in float g})
|
||||||
0:? 'f' ( smooth in float)
|
0:? 'f' ( smooth in float)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@ spv.sparseTexture.frag
|
|||||||
Validation failed
|
Validation failed
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 438
|
// Id's are bound by 442
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability ImageGatherExtended
|
Capability ImageGatherExtended
|
||||||
@ -12,7 +12,7 @@ Validation failed
|
|||||||
Capability SampledCubeArray
|
Capability SampledCubeArray
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 33 48 89 365 393 405 423
|
EntryPoint Fragment 4 "main" 33 48 89 397 409 427
|
||||||
ExecutionMode 4 OriginUpperLeft
|
ExecutionMode 4 OriginUpperLeft
|
||||||
Source GLSL 450
|
Source GLSL 450
|
||||||
SourceExtension "GL_ARB_sparse_texture2"
|
SourceExtension "GL_ARB_sparse_texture2"
|
||||||
@ -40,13 +40,12 @@ Validation failed
|
|||||||
Name 228 "is2DArray"
|
Name 228 "is2DArray"
|
||||||
Name 261 "sCubeShadow"
|
Name 261 "sCubeShadow"
|
||||||
Name 294 "s2DRectShadow"
|
Name 294 "s2DRectShadow"
|
||||||
Name 365 "offsets"
|
Name 394 "i2D"
|
||||||
Name 390 "i2D"
|
Name 397 "ic2"
|
||||||
Name 393 "ic2"
|
Name 406 "ii3D"
|
||||||
Name 402 "ii3D"
|
Name 409 "ic3"
|
||||||
Name 405 "ic3"
|
Name 418 "i2DMS"
|
||||||
Name 414 "i2DMS"
|
Name 427 "outColor"
|
||||||
Name 423 "outColor"
|
|
||||||
Decorate 29(s2D) DescriptorSet 0
|
Decorate 29(s2D) DescriptorSet 0
|
||||||
Decorate 29(s2D) Binding 0
|
Decorate 29(s2D) Binding 0
|
||||||
Decorate 33(c2) Location 0
|
Decorate 33(c2) Location 0
|
||||||
@ -74,19 +73,17 @@ Validation failed
|
|||||||
Decorate 261(sCubeShadow) Binding 3
|
Decorate 261(sCubeShadow) Binding 3
|
||||||
Decorate 294(s2DRectShadow) DescriptorSet 0
|
Decorate 294(s2DRectShadow) DescriptorSet 0
|
||||||
Decorate 294(s2DRectShadow) Binding 5
|
Decorate 294(s2DRectShadow) Binding 5
|
||||||
Decorate 365(offsets) Flat
|
Decorate 394(i2D) DescriptorSet 0
|
||||||
Decorate 365(offsets) Location 5
|
Decorate 394(i2D) Binding 12
|
||||||
Decorate 390(i2D) DescriptorSet 0
|
Decorate 397(ic2) Flat
|
||||||
Decorate 390(i2D) Binding 12
|
Decorate 397(ic2) Location 3
|
||||||
Decorate 393(ic2) Flat
|
Decorate 406(ii3D) DescriptorSet 0
|
||||||
Decorate 393(ic2) Location 3
|
Decorate 406(ii3D) Binding 13
|
||||||
Decorate 402(ii3D) DescriptorSet 0
|
Decorate 409(ic3) Flat
|
||||||
Decorate 402(ii3D) Binding 13
|
Decorate 409(ic3) Location 4
|
||||||
Decorate 405(ic3) Flat
|
Decorate 418(i2DMS) DescriptorSet 0
|
||||||
Decorate 405(ic3) Location 4
|
Decorate 418(i2DMS) Binding 14
|
||||||
Decorate 414(i2DMS) DescriptorSet 0
|
Decorate 427(outColor) Location 0
|
||||||
Decorate 414(i2DMS) Binding 14
|
|
||||||
Decorate 423(outColor) Location 0
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 1
|
6: TypeInt 32 1
|
||||||
@ -189,31 +186,38 @@ Validation failed
|
|||||||
340: 143(ivec2) ConstantComposite 192 192
|
340: 143(ivec2) ConstantComposite 192 192
|
||||||
362: 20(int) Constant 4
|
362: 20(int) Constant 4
|
||||||
363: TypeArray 143(ivec2) 362
|
363: TypeArray 143(ivec2) 362
|
||||||
364: TypePointer Input 363
|
364: 6(int) Constant 1
|
||||||
365(offsets): 364(ptr) Variable Input
|
365: 143(ivec2) ConstantComposite 364 130
|
||||||
388: TypeImage 10(float) 2D nonsampled format:Rgba32f
|
366: 143(ivec2) ConstantComposite 144 192
|
||||||
389: TypePointer UniformConstant 388
|
367: 6(int) Constant 15
|
||||||
390(i2D): 389(ptr) Variable UniformConstant
|
368: 6(int) Constant 16
|
||||||
392: TypePointer Input 143(ivec2)
|
369: 143(ivec2) ConstantComposite 367 368
|
||||||
393(ic2): 392(ptr) Variable Input
|
370: 6(int) Constant 4294967294
|
||||||
400: TypeImage 6(int) 3D nonsampled format:Rgba32i
|
371: 143(ivec2) ConstantComposite 370 9
|
||||||
401: TypePointer UniformConstant 400
|
372: 363 ConstantComposite 365 366 369 371
|
||||||
402(ii3D): 401(ptr) Variable UniformConstant
|
392: TypeImage 10(float) 2D nonsampled format:Rgba32f
|
||||||
404: TypePointer Input 129(ivec3)
|
393: TypePointer UniformConstant 392
|
||||||
405(ic3): 404(ptr) Variable Input
|
394(i2D): 393(ptr) Variable UniformConstant
|
||||||
412: TypeImage 10(float) 2D multi-sampled nonsampled format:Rgba32f
|
396: TypePointer Input 143(ivec2)
|
||||||
413: TypePointer UniformConstant 412
|
397(ic2): 396(ptr) Variable Input
|
||||||
414(i2DMS): 413(ptr) Variable UniformConstant
|
404: TypeImage 6(int) 3D nonsampled format:Rgba32i
|
||||||
422: TypePointer Output 11(fvec4)
|
405: TypePointer UniformConstant 404
|
||||||
423(outColor): 422(ptr) Variable Output
|
406(ii3D): 405(ptr) Variable UniformConstant
|
||||||
425: TypeBool
|
408: TypePointer Input 129(ivec3)
|
||||||
|
409(ic3): 408(ptr) Variable Input
|
||||||
|
416: TypeImage 10(float) 2D multi-sampled nonsampled format:Rgba32f
|
||||||
|
417: TypePointer UniformConstant 416
|
||||||
|
418(i2DMS): 417(ptr) Variable UniformConstant
|
||||||
|
426: TypePointer Output 11(fvec4)
|
||||||
|
427(outColor): 426(ptr) Variable Output
|
||||||
|
429: TypeBool
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
8(resident): 7(ptr) Variable Function
|
8(resident): 7(ptr) Variable Function
|
||||||
13(texel): 12(ptr) Variable Function
|
13(texel): 12(ptr) Variable Function
|
||||||
18(itexel): 17(ptr) Variable Function
|
18(itexel): 17(ptr) Variable Function
|
||||||
23(utexel): 22(ptr) Variable Function
|
23(utexel): 22(ptr) Variable Function
|
||||||
427: 12(ptr) Variable Function
|
431: 12(ptr) Variable Function
|
||||||
Store 8(resident) 9
|
Store 8(resident) 9
|
||||||
Store 13(texel) 15
|
Store 13(texel) 15
|
||||||
Store 18(itexel) 19
|
Store 18(itexel) 19
|
||||||
@ -534,79 +538,76 @@ Validation failed
|
|||||||
Store 8(resident) 359
|
Store 8(resident) 359
|
||||||
360: 27 Load 29(s2D)
|
360: 27 Load 29(s2D)
|
||||||
361: 31(fvec2) Load 33(c2)
|
361: 31(fvec2) Load 33(c2)
|
||||||
366: 363 Load 365(offsets)
|
373: 35(ResType) ImageSparseGather 360 361 9 ConstOffsets 372
|
||||||
367: 35(ResType) ImageSparseGather 360 361 9 ConstOffsets 366
|
374: 11(fvec4) CompositeExtract 373 1
|
||||||
368: 11(fvec4) CompositeExtract 367 1
|
Store 13(texel) 374
|
||||||
Store 13(texel) 368
|
375: 6(int) CompositeExtract 373 0
|
||||||
369: 6(int) CompositeExtract 367 0
|
376: 6(int) Load 8(resident)
|
||||||
370: 6(int) Load 8(resident)
|
377: 6(int) BitwiseOr 376 375
|
||||||
371: 6(int) BitwiseOr 370 369
|
Store 8(resident) 377
|
||||||
Store 8(resident) 371
|
378: 226 Load 228(is2DArray)
|
||||||
372: 226 Load 228(is2DArray)
|
379: 46(fvec3) Load 48(c3)
|
||||||
373: 46(fvec3) Load 48(c3)
|
380: 62(ResType) ImageSparseGather 378 379 130 ConstOffsets 372
|
||||||
374: 363 Load 365(offsets)
|
381: 16(ivec4) CompositeExtract 380 1
|
||||||
375: 62(ResType) ImageSparseGather 372 373 130 ConstOffsets 374
|
Store 18(itexel) 381
|
||||||
376: 16(ivec4) CompositeExtract 375 1
|
382: 6(int) CompositeExtract 380 0
|
||||||
Store 18(itexel) 376
|
383: 6(int) Load 8(resident)
|
||||||
377: 6(int) CompositeExtract 375 0
|
384: 6(int) BitwiseOr 383 382
|
||||||
378: 6(int) Load 8(resident)
|
Store 8(resident) 384
|
||||||
379: 6(int) BitwiseOr 378 377
|
385: 292 Load 294(s2DRectShadow)
|
||||||
Store 8(resident) 379
|
386: 31(fvec2) Load 33(c2)
|
||||||
380: 292 Load 294(s2DRectShadow)
|
387: 35(ResType) ImageSparseDrefGather 385 386 50 ConstOffsets 372
|
||||||
381: 31(fvec2) Load 33(c2)
|
388: 11(fvec4) CompositeExtract 387 1
|
||||||
382: 363 Load 365(offsets)
|
Store 13(texel) 388
|
||||||
383: 35(ResType) ImageSparseDrefGather 380 381 50 ConstOffsets 382
|
389: 6(int) CompositeExtract 387 0
|
||||||
384: 11(fvec4) CompositeExtract 383 1
|
390: 6(int) Load 8(resident)
|
||||||
Store 13(texel) 384
|
391: 6(int) BitwiseOr 390 389
|
||||||
385: 6(int) CompositeExtract 383 0
|
Store 8(resident) 391
|
||||||
386: 6(int) Load 8(resident)
|
395: 392 Load 394(i2D)
|
||||||
387: 6(int) BitwiseOr 386 385
|
398: 143(ivec2) Load 397(ic2)
|
||||||
Store 8(resident) 387
|
399: 35(ResType) ImageSparseRead 395 398
|
||||||
391: 388 Load 390(i2D)
|
400: 11(fvec4) CompositeExtract 399 1
|
||||||
394: 143(ivec2) Load 393(ic2)
|
Store 13(texel) 400
|
||||||
395: 35(ResType) ImageSparseRead 391 394
|
401: 6(int) CompositeExtract 399 0
|
||||||
396: 11(fvec4) CompositeExtract 395 1
|
402: 6(int) Load 8(resident)
|
||||||
Store 13(texel) 396
|
403: 6(int) BitwiseOr 402 401
|
||||||
397: 6(int) CompositeExtract 395 0
|
Store 8(resident) 403
|
||||||
398: 6(int) Load 8(resident)
|
407: 404 Load 406(ii3D)
|
||||||
399: 6(int) BitwiseOr 398 397
|
410: 129(ivec3) Load 409(ic3)
|
||||||
Store 8(resident) 399
|
411: 62(ResType) ImageSparseRead 407 410
|
||||||
403: 400 Load 402(ii3D)
|
412: 16(ivec4) CompositeExtract 411 1
|
||||||
406: 129(ivec3) Load 405(ic3)
|
Store 18(itexel) 412
|
||||||
407: 62(ResType) ImageSparseRead 403 406
|
413: 6(int) CompositeExtract 411 0
|
||||||
408: 16(ivec4) CompositeExtract 407 1
|
414: 6(int) Load 8(resident)
|
||||||
Store 18(itexel) 408
|
415: 6(int) BitwiseOr 414 413
|
||||||
409: 6(int) CompositeExtract 407 0
|
Store 8(resident) 415
|
||||||
410: 6(int) Load 8(resident)
|
419: 416 Load 418(i2DMS)
|
||||||
411: 6(int) BitwiseOr 410 409
|
420: 143(ivec2) Load 397(ic2)
|
||||||
Store 8(resident) 411
|
421: 35(ResType) ImageSparseRead 419 420 Sample 144
|
||||||
415: 412 Load 414(i2DMS)
|
422: 11(fvec4) CompositeExtract 421 1
|
||||||
416: 143(ivec2) Load 393(ic2)
|
Store 13(texel) 422
|
||||||
417: 35(ResType) ImageSparseRead 415 416 Sample 144
|
423: 6(int) CompositeExtract 421 0
|
||||||
418: 11(fvec4) CompositeExtract 417 1
|
|
||||||
Store 13(texel) 418
|
|
||||||
419: 6(int) CompositeExtract 417 0
|
|
||||||
420: 6(int) Load 8(resident)
|
|
||||||
421: 6(int) BitwiseOr 420 419
|
|
||||||
Store 8(resident) 421
|
|
||||||
424: 6(int) Load 8(resident)
|
424: 6(int) Load 8(resident)
|
||||||
426: 425(bool) ImageSparseTexelsResident 424
|
425: 6(int) BitwiseOr 424 423
|
||||||
SelectionMerge 429 None
|
Store 8(resident) 425
|
||||||
BranchConditional 426 428 431
|
428: 6(int) Load 8(resident)
|
||||||
428: Label
|
430: 429(bool) ImageSparseTexelsResident 428
|
||||||
430: 11(fvec4) Load 13(texel)
|
SelectionMerge 433 None
|
||||||
Store 427 430
|
BranchConditional 430 432 435
|
||||||
Branch 429
|
432: Label
|
||||||
431: Label
|
434: 11(fvec4) Load 13(texel)
|
||||||
432: 16(ivec4) Load 18(itexel)
|
Store 431 434
|
||||||
433: 11(fvec4) ConvertSToF 432
|
Branch 433
|
||||||
434: 21(ivec4) Load 23(utexel)
|
435: Label
|
||||||
435: 11(fvec4) ConvertUToF 434
|
436: 16(ivec4) Load 18(itexel)
|
||||||
436: 11(fvec4) FAdd 433 435
|
437: 11(fvec4) ConvertSToF 436
|
||||||
Store 427 436
|
438: 21(ivec4) Load 23(utexel)
|
||||||
Branch 429
|
439: 11(fvec4) ConvertUToF 438
|
||||||
429: Label
|
440: 11(fvec4) FAdd 437 439
|
||||||
437: 11(fvec4) Load 427
|
Store 431 440
|
||||||
Store 423(outColor) 437
|
Branch 433
|
||||||
|
433: Label
|
||||||
|
441: 11(fvec4) Load 431
|
||||||
|
Store 427(outColor) 441
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -889,19 +889,20 @@ f16vec4 testSparseTextureGatherOffset()
|
|||||||
f16vec4 testSparseTextureGatherOffsets()
|
f16vec4 testSparseTextureGatherOffsets()
|
||||||
{
|
{
|
||||||
f16vec4 texel = f16vec4(0.0hf);
|
f16vec4 texel = f16vec4(0.0hf);
|
||||||
|
const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
|
||||||
|
|
||||||
sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel, 0);
|
sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel, 0);
|
||||||
sparseTextureGatherOffsetsARB(s2D, f16c2, offsets, texel, 0, f16bias);
|
sparseTextureGatherOffsetsARB(s2D, f16c2, constOffsets, texel, 0, f16bias);
|
||||||
sparseTextureGatherOffsetsARB(s2DArray, c3, offsets, texel, 0);
|
sparseTextureGatherOffsetsARB(s2DArray, c3, constOffsets, texel, 0);
|
||||||
sparseTextureGatherOffsetsARB(s2DArray, f16c3, offsets, texel, 0, f16bias);
|
sparseTextureGatherOffsetsARB(s2DArray, f16c3, constOffsets, texel, 0, f16bias);
|
||||||
sparseTextureGatherOffsetsARB(s2DRect, c2, offsets, texel, 0);
|
sparseTextureGatherOffsetsARB(s2DRect, c2, constOffsets, texel, 0);
|
||||||
sparseTextureGatherOffsetsARB(s2DRect, f16c2, offsets, texel, 0);
|
sparseTextureGatherOffsetsARB(s2DRect, f16c2, constOffsets, texel, 0);
|
||||||
sparseTextureGatherOffsetsARB(s2DShadow, c2, compare, offsets, texel);
|
sparseTextureGatherOffsetsARB(s2DShadow, c2, compare, constOffsets, texel);
|
||||||
sparseTextureGatherOffsetsARB(s2DShadow, f16c2, compare, offsets, texel);
|
sparseTextureGatherOffsetsARB(s2DShadow, f16c2, compare, constOffsets, texel);
|
||||||
sparseTextureGatherOffsetsARB(s2DArrayShadow, c3, compare, offsets, texel);
|
sparseTextureGatherOffsetsARB(s2DArrayShadow, c3, compare, constOffsets, texel);
|
||||||
sparseTextureGatherOffsetsARB(s2DArrayShadow, f16c3, compare, offsets, texel);
|
sparseTextureGatherOffsetsARB(s2DArrayShadow, f16c3, compare, constOffsets, texel);
|
||||||
sparseTextureGatherOffsetsARB(s2DRectShadow, c2, compare, offsets, texel);
|
sparseTextureGatherOffsetsARB(s2DRectShadow, c2, compare, constOffsets, texel);
|
||||||
sparseTextureGatherOffsetsARB(s2DRectShadow, f16c2, compare, offsets, texel);
|
sparseTextureGatherOffsetsARB(s2DRectShadow, f16c2, compare, constOffsets, texel);
|
||||||
|
|
||||||
return texel;
|
return texel;
|
||||||
}
|
}
|
||||||
|
@ -27,8 +27,6 @@ in vec4 c4;
|
|||||||
in flat ivec2 ic2;
|
in flat ivec2 ic2;
|
||||||
in flat ivec3 ic3;
|
in flat ivec3 ic3;
|
||||||
|
|
||||||
in flat ivec2 offsets[4];
|
|
||||||
|
|
||||||
out vec4 outColor;
|
out vec4 outColor;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
@ -79,9 +77,10 @@ void main()
|
|||||||
resident |= sparseTextureGatherOffsetARB(is2DArray, c3, ivec2(5), itexel, 2);
|
resident |= sparseTextureGatherOffsetARB(is2DArray, c3, ivec2(5), itexel, 2);
|
||||||
resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel);
|
resident |= sparseTextureGatherOffsetARB(s2DRectShadow, c2, 2.0, ivec2(7), texel);
|
||||||
|
|
||||||
resident |= sparseTextureGatherOffsetsARB(s2D, c2, offsets, texel);
|
const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0));
|
||||||
resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, offsets, itexel, 2);
|
resident |= sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel);
|
||||||
resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, offsets, texel);
|
resident |= sparseTextureGatherOffsetsARB(is2DArray, c3, constOffsets, itexel, 2);
|
||||||
|
resident |= sparseTextureGatherOffsetsARB(s2DRectShadow, c2, 2.0, constOffsets, texel);
|
||||||
|
|
||||||
resident |= sparseImageLoadARB(i2D, ic2, texel);
|
resident |= sparseImageLoadARB(i2D, ic2, texel);
|
||||||
resident |= sparseImageLoadARB(ii3D, ic3, itexel);
|
resident |= sparseImageLoadARB(ii3D, ic3, itexel);
|
||||||
|
@ -2096,7 +2096,13 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
|
|||||||
profileRequires(loc, ~EEsProfile, 450, nullptr, feature);
|
profileRequires(loc, ~EEsProfile, 450, nullptr, feature);
|
||||||
requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature);
|
requireExtensions(loc, 1, &E_GL_AMD_texture_gather_bias_lod, feature);
|
||||||
}
|
}
|
||||||
|
// As per GL_ARB_sparse_texture2 extension "Offsets" parameter must be constant integral expression
|
||||||
|
// for sparseTextureGatherOffsetsARB just as textureGatherOffsets
|
||||||
|
if (callNode.getOp() == EOpSparseTextureGatherOffsets) {
|
||||||
|
int offsetsArg = arg0->getType().getSampler().shadow ? 3 : 2;
|
||||||
|
if (!(*argp)[offsetsArg]->getAsConstantUnion())
|
||||||
|
error(loc, "argument must be compile-time constant", "offsets", "");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user