Finish implementing compute shaders, within #version 430, partly based on a submission.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27674 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2014-08-11 02:32:30 +00:00
parent ddea678e3e
commit 79cddfcb56
17 changed files with 239 additions and 43 deletions

View file

@ -69,6 +69,7 @@ enum TStorageQualifier {
EvqVaryingOut, // pipeline ouput, read/write
EvqUniform, // read only, shader with app
EvqBuffer, // read only, shader with app
EvqShared, // compute shader's read/write 'shared' qualifier
// parameters
EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
@ -109,6 +110,8 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q)
case EvqVaryingIn: return "in"; break;
case EvqVaryingOut: return "out"; break;
case EvqUniform: return "uniform"; break;
case EvqBuffer: return "buffer"; break;
case EvqShared: return "shared"; break;
case EvqIn: return "in"; break;
case EvqOut: return "out"; break;
case EvqInOut: return "inout"; break;

View file

@ -342,7 +342,7 @@ public:
bool isMemory() const
{
return shared || coherent || volatil || restrict || readonly || writeonly;
return coherent || volatil || restrict || readonly || writeonly;
}
bool isInterpolation() const
{
@ -693,6 +693,7 @@ struct TShaderQualifiers {
TVertexSpacing spacing;
TVertexOrder order;
bool pointMode;
int localSize[3]; // compute shader
bool earlyFragmentTests; // fragment input
void init()
@ -705,6 +706,9 @@ struct TShaderQualifiers {
spacing = EvsNone;
order = EvoNone;
pointMode = false;
localSize[0] = 1;
localSize[1] = 1;
localSize[2] = 1;
earlyFragmentTests = false;
}
@ -728,6 +732,10 @@ struct TShaderQualifiers {
order = src.order;
if (src.pointMode)
pointMode = true;
for (int i = 0; i < 3; ++i) {
if (src.localSize[i] > 1)
localSize[i] = src.localSize[i];
}
if (src.earlyFragmentTests)
earlyFragmentTests = true;
}