Implement GL_ARB_shader_texture_image_samples. Also add in gl_MaxSamples and the float imageAtomicExchange.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27721 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -157,3 +157,26 @@ void fooBarrier()
|
||||
}
|
||||
|
||||
buffer vec4 v; // ERROR
|
||||
|
||||
uniform sampler2DMS s2dms;
|
||||
uniform usampler2DMSArray us2dmsa;
|
||||
layout(rgba32i) uniform iimage2DMS ii2dms;
|
||||
layout(rgba32f) uniform image2DMSArray i2dmsa;
|
||||
|
||||
void fooq()
|
||||
{
|
||||
int s = textureSamples(s2dms); // ERROR
|
||||
s += textureSamples(us2dmsa); // ERROR
|
||||
s += imageSamples(ii2dms); // ERROR
|
||||
s += imageSamples(i2dmsa); // ERROR
|
||||
}
|
||||
|
||||
#extension GL_ARB_shader_texture_image_samples : enable
|
||||
|
||||
void fooq2()
|
||||
{
|
||||
int s = textureSamples(s2dms);
|
||||
s += textureSamples(us2dmsa);
|
||||
s += imageSamples(ii2dms);
|
||||
s += imageSamples(i2dmsa);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ void main()
|
||||
v4 = fwidthCoarse(in4) + fwidthFine(in4);
|
||||
|
||||
float cull = gl_CullDistance[2];
|
||||
float consts = gl_MaxCullDistances + gl_MaxCombinedClipAndCullDistances;
|
||||
float consts = gl_MaxCullDistances + gl_MaxCombinedClipAndCullDistances + gl_MaxSamples;
|
||||
|
||||
if (gl_HelperInvocation)
|
||||
++v4;
|
||||
@@ -33,3 +33,17 @@ void main()
|
||||
uint um = mix(uin, uin, b);
|
||||
ivec3 im3 = mix(ivec3(uin), ivec3(uin), bvec3(b));
|
||||
}
|
||||
|
||||
uniform sampler2DMS s2dms;
|
||||
uniform usampler2DMSArray us2dmsa;
|
||||
layout(rgba32i) uniform iimage2DMS ii2dms;
|
||||
layout(rgba32f) uniform image2DMSArray i2dmsa;
|
||||
|
||||
void foo()
|
||||
{
|
||||
int s = textureSamples(s2dms);
|
||||
s += textureSamples(us2dmsa);
|
||||
s += imageSamples(ii2dms);
|
||||
s += imageSamples(i2dmsa);
|
||||
float f = imageAtomicExchange(i2dmsa, ivec3(in3), 2, 4.5);
|
||||
}
|
||||
|
||||
@@ -49,11 +49,16 @@ ERROR: 0:150: 'barrier' : no matching overloaded function found
|
||||
ERROR: 0:154: 'memoryBarrierShared' : no matching overloaded function found
|
||||
ERROR: 0:156: 'groupMemoryBarrier' : no matching overloaded function found
|
||||
ERROR: 0:159: 'buffer' : buffers can be declared only as blocks
|
||||
ERROR: 49 compilation errors. No code generated.
|
||||
ERROR: 0:168: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:169: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:170: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:171: 'textureSamples and imageSamples' : not supported for this version or the enabled extensions
|
||||
ERROR: 53 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
Requested GL_ARB_enhanced_layouts
|
||||
Requested GL_ARB_shader_texture_image_samples
|
||||
in xfb mode
|
||||
ERROR: node is still EOpNull!
|
||||
0:14 Function Definition: foo( (void)
|
||||
@@ -88,6 +93,46 @@ ERROR: node is still EOpNull!
|
||||
0:155 MemoryBarrierImage (void)
|
||||
0:156 Constant:
|
||||
0:156 0.000000
|
||||
0:166 Function Definition: fooq( (void)
|
||||
0:166 Function Parameters:
|
||||
0:168 Sequence
|
||||
0:168 Sequence
|
||||
0:168 move second child to first child (int)
|
||||
0:168 's' (int)
|
||||
0:168 Function Call: textureSamples(s21; (int)
|
||||
0:168 's2dms' (uniform sampler2DMS)
|
||||
0:169 add second child into first child (int)
|
||||
0:169 's' (int)
|
||||
0:169 Function Call: textureSamples(usA21; (int)
|
||||
0:169 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:170 add second child into first child (int)
|
||||
0:170 's' (int)
|
||||
0:170 Function Call: imageSamples(iI21; (int)
|
||||
0:170 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:171 add second child into first child (int)
|
||||
0:171 's' (int)
|
||||
0:171 Function Call: imageSamples(IA21; (int)
|
||||
0:171 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:176 Function Definition: fooq2( (void)
|
||||
0:176 Function Parameters:
|
||||
0:178 Sequence
|
||||
0:178 Sequence
|
||||
0:178 move second child to first child (int)
|
||||
0:178 's' (int)
|
||||
0:178 Function Call: textureSamples(s21; (int)
|
||||
0:178 's2dms' (uniform sampler2DMS)
|
||||
0:179 add second child into first child (int)
|
||||
0:179 's' (int)
|
||||
0:179 Function Call: textureSamples(usA21; (int)
|
||||
0:179 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:180 add second child into first child (int)
|
||||
0:180 's' (int)
|
||||
0:180 Function Call: imageSamples(iI21; (int)
|
||||
0:180 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:181 add second child into first child (int)
|
||||
0:181 's' (int)
|
||||
0:181 Function Call: imageSamples(IA21; (int)
|
||||
0:181 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:? Linker Objects
|
||||
0:? 'v4' (layout(location=3 ) 4-component vector of float)
|
||||
0:? 'uv4' (layout(location=4 ) uniform 4-component vector of float)
|
||||
@@ -129,6 +174,10 @@ ERROR: node is still EOpNull!
|
||||
0:? 'bbinst5' (out block{layout(xfb_buffer=1 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=1 xfb_offset=64 xfb_stride=80 ) out 4-component vector of float bbv2})
|
||||
0:? 'sharedv' (shared 4-component vector of float)
|
||||
0:? 'v' (buffer 4-component vector of float)
|
||||
0:? 's2dms' (uniform sampler2DMS)
|
||||
0:? 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:? 'gl_VertexID' (gl_VertexId int)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int)
|
||||
|
||||
@@ -141,6 +190,7 @@ ERROR: xfb_buffer 3, xfb_stride 64, minimum stride needed: 80
|
||||
|
||||
Shader version: 430
|
||||
Requested GL_ARB_enhanced_layouts
|
||||
Requested GL_ARB_shader_texture_image_samples
|
||||
in xfb mode
|
||||
ERROR: node is still EOpNull!
|
||||
0:14 Function Definition: foo( (void)
|
||||
@@ -175,6 +225,46 @@ ERROR: node is still EOpNull!
|
||||
0:155 MemoryBarrierImage (void)
|
||||
0:156 Constant:
|
||||
0:156 0.000000
|
||||
0:166 Function Definition: fooq( (void)
|
||||
0:166 Function Parameters:
|
||||
0:168 Sequence
|
||||
0:168 Sequence
|
||||
0:168 move second child to first child (int)
|
||||
0:168 's' (int)
|
||||
0:168 Function Call: textureSamples(s21; (int)
|
||||
0:168 's2dms' (uniform sampler2DMS)
|
||||
0:169 add second child into first child (int)
|
||||
0:169 's' (int)
|
||||
0:169 Function Call: textureSamples(usA21; (int)
|
||||
0:169 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:170 add second child into first child (int)
|
||||
0:170 's' (int)
|
||||
0:170 Function Call: imageSamples(iI21; (int)
|
||||
0:170 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:171 add second child into first child (int)
|
||||
0:171 's' (int)
|
||||
0:171 Function Call: imageSamples(IA21; (int)
|
||||
0:171 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:176 Function Definition: fooq2( (void)
|
||||
0:176 Function Parameters:
|
||||
0:178 Sequence
|
||||
0:178 Sequence
|
||||
0:178 move second child to first child (int)
|
||||
0:178 's' (int)
|
||||
0:178 Function Call: textureSamples(s21; (int)
|
||||
0:178 's2dms' (uniform sampler2DMS)
|
||||
0:179 add second child into first child (int)
|
||||
0:179 's' (int)
|
||||
0:179 Function Call: textureSamples(usA21; (int)
|
||||
0:179 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:180 add second child into first child (int)
|
||||
0:180 's' (int)
|
||||
0:180 Function Call: imageSamples(iI21; (int)
|
||||
0:180 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:181 add second child into first child (int)
|
||||
0:181 's' (int)
|
||||
0:181 Function Call: imageSamples(IA21; (int)
|
||||
0:181 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:? Linker Objects
|
||||
0:? 'v4' (layout(location=3 ) 4-component vector of float)
|
||||
0:? 'uv4' (layout(location=4 ) uniform 4-component vector of float)
|
||||
@@ -216,6 +306,10 @@ ERROR: node is still EOpNull!
|
||||
0:? 'bbinst5' (out block{layout(xfb_buffer=1 xfb_offset=0 ) out 4-component vector of float bbv1, layout(xfb_buffer=1 xfb_offset=64 xfb_stride=80 ) out 4-component vector of float bbv2})
|
||||
0:? 'sharedv' (shared 4-component vector of float)
|
||||
0:? 'v' (buffer 4-component vector of float)
|
||||
0:? 's2dms' (uniform sampler2DMS)
|
||||
0:? 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:? 'gl_VertexID' (gl_VertexId int)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int)
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ Shader version: 450
|
||||
0:19 move second child to first child (float)
|
||||
0:19 'consts' (float)
|
||||
0:19 Constant:
|
||||
0:19 16.000000
|
||||
0:19 20.000000
|
||||
0:21 Test condition and select (void)
|
||||
0:21 Condition
|
||||
0:21 'gl_HelperInvocation' (in bool)
|
||||
@@ -99,12 +99,47 @@ Shader version: 450
|
||||
0:34 'uin' (uint)
|
||||
0:34 Construct bvec3 (3-component vector of bool)
|
||||
0:34 'b' (bool)
|
||||
0:42 Function Definition: foo( (void)
|
||||
0:42 Function Parameters:
|
||||
0:44 Sequence
|
||||
0:44 Sequence
|
||||
0:44 move second child to first child (int)
|
||||
0:44 's' (int)
|
||||
0:44 Function Call: textureSamples(s21; (int)
|
||||
0:44 's2dms' (uniform sampler2DMS)
|
||||
0:45 add second child into first child (int)
|
||||
0:45 's' (int)
|
||||
0:45 Function Call: textureSamples(usA21; (int)
|
||||
0:45 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:46 add second child into first child (int)
|
||||
0:46 's' (int)
|
||||
0:46 Function Call: imageSamples(iI21; (int)
|
||||
0:46 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:47 add second child into first child (int)
|
||||
0:47 's' (int)
|
||||
0:47 Function Call: imageSamples(IA21; (int)
|
||||
0:47 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child (float)
|
||||
0:48 'f' (float)
|
||||
0:48 Function Call: imageAtomicExchange(IA21;vi3;i1;f1; (float)
|
||||
0:48 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:48 Convert float to int (3-component vector of int)
|
||||
0:48 'in3' (smooth in 3-component vector of float)
|
||||
0:48 Constant:
|
||||
0:48 2 (const int)
|
||||
0:48 Constant:
|
||||
0:48 4.500000
|
||||
0:? Linker Objects
|
||||
0:? 'in1' (smooth in float)
|
||||
0:? 'in2' (smooth in 2-component vector of float)
|
||||
0:? 'in3' (smooth in 3-component vector of float)
|
||||
0:? 'in4' (smooth in 4-component vector of float)
|
||||
0:? 'gl_CullDistance' (smooth in implicitly-sized array of float)
|
||||
0:? 's2dms' (uniform sampler2DMS)
|
||||
0:? 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -167,7 +202,7 @@ Shader version: 450
|
||||
0:19 move second child to first child (float)
|
||||
0:19 'consts' (float)
|
||||
0:19 Constant:
|
||||
0:19 16.000000
|
||||
0:19 20.000000
|
||||
0:21 Test condition and select (void)
|
||||
0:21 Condition
|
||||
0:21 'gl_HelperInvocation' (in bool)
|
||||
@@ -208,10 +243,45 @@ Shader version: 450
|
||||
0:34 'uin' (uint)
|
||||
0:34 Construct bvec3 (3-component vector of bool)
|
||||
0:34 'b' (bool)
|
||||
0:42 Function Definition: foo( (void)
|
||||
0:42 Function Parameters:
|
||||
0:44 Sequence
|
||||
0:44 Sequence
|
||||
0:44 move second child to first child (int)
|
||||
0:44 's' (int)
|
||||
0:44 Function Call: textureSamples(s21; (int)
|
||||
0:44 's2dms' (uniform sampler2DMS)
|
||||
0:45 add second child into first child (int)
|
||||
0:45 's' (int)
|
||||
0:45 Function Call: textureSamples(usA21; (int)
|
||||
0:45 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:46 add second child into first child (int)
|
||||
0:46 's' (int)
|
||||
0:46 Function Call: imageSamples(iI21; (int)
|
||||
0:46 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:47 add second child into first child (int)
|
||||
0:47 's' (int)
|
||||
0:47 Function Call: imageSamples(IA21; (int)
|
||||
0:47 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child (float)
|
||||
0:48 'f' (float)
|
||||
0:48 Function Call: imageAtomicExchange(IA21;vi3;i1;f1; (float)
|
||||
0:48 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
0:48 Convert float to int (3-component vector of int)
|
||||
0:48 'in3' (smooth in 3-component vector of float)
|
||||
0:48 Constant:
|
||||
0:48 2 (const int)
|
||||
0:48 Constant:
|
||||
0:48 4.500000
|
||||
0:? Linker Objects
|
||||
0:? 'in1' (smooth in float)
|
||||
0:? 'in2' (smooth in 2-component vector of float)
|
||||
0:? 'in3' (smooth in 3-component vector of float)
|
||||
0:? 'in4' (smooth in 4-component vector of float)
|
||||
0:? 'gl_CullDistance' (smooth in 3-element array of float)
|
||||
0:? 's2dms' (uniform sampler2DMS)
|
||||
0:? 'us2dmsa' (uniform usampler2DMSArray)
|
||||
0:? 'ii2dms' (layout(rgba32i ) uniform iimage2DMS)
|
||||
0:? 'i2dmsa' (layout(rgba32f ) uniform image2DMSArray)
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ MaxTransformFeedbackBuffers 4
|
||||
MaxTransformFeedbackInterleavedComponents 64
|
||||
MaxCullDistances 8
|
||||
MaxCombinedClipAndCullDistances 8
|
||||
MaxSamples 4
|
||||
nonInductiveForLoops 1
|
||||
whileLoops 1
|
||||
doWhileLoops 1
|
||||
|
||||
Reference in New Issue
Block a user