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:
John Kessenich
2014-08-13 16:54:02 +00:00
parent df1d81a958
commit cd77f8e922
11 changed files with 290 additions and 45 deletions

View File

@@ -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);
}