Tessellation partial implementation (not ready for use yet), including:
- the built-in constants - built-in variable declarations, some dependent on gl_MaxPatchVertices - layout qualifier for vertices (shared with geometry shader max_vertices) - layout qualifiers for vertex spacing, vertex order, point mode, and primitive type - link semantics for layout qualifiers Still TBD: - patch qualifier and arrayed input handling - sizing of gl_out[] - additional semantic checking - supporting the extension on version 150 git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24468 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
2fcc9ff1d2
commit
623833fabc
28 changed files with 831 additions and 342 deletions
|
|
@ -221,6 +221,19 @@ enum TLayoutGeometry {
|
|||
ElgIsolines,
|
||||
};
|
||||
|
||||
enum TVertexSpacing {
|
||||
EvsNone,
|
||||
EvsEqual,
|
||||
EvsFractionalEven,
|
||||
EvsFractionalOdd
|
||||
};
|
||||
|
||||
enum TVertexOrder {
|
||||
EvoNone,
|
||||
EvoCw,
|
||||
EvoCcw
|
||||
};
|
||||
|
||||
class TQualifier {
|
||||
public:
|
||||
void clear()
|
||||
|
|
@ -232,7 +245,7 @@ public:
|
|||
smooth = false;
|
||||
flat = false;
|
||||
nopersp = false;
|
||||
patch = false;
|
||||
patch = false; // TODO 4.0 tessellation: implement semantics of patch (all of 4.3 stuff...), including arrayed inputs
|
||||
sample = false;
|
||||
shared = false;
|
||||
coherent = false;
|
||||
|
|
@ -405,6 +418,23 @@ public:
|
|||
default: return "none";
|
||||
}
|
||||
}
|
||||
static const char* getVertexSpacingString(TVertexSpacing spacing)
|
||||
{
|
||||
switch (spacing) {
|
||||
case EvsEqual: return "equal_spacing";
|
||||
case EvsFractionalEven: return "fractional_even_spacing";
|
||||
case EvsFractionalOdd: return "fractional_odd_spacing";
|
||||
default: return "none";
|
||||
}
|
||||
}
|
||||
static const char* getVertexOrderString(TVertexOrder order)
|
||||
{
|
||||
switch (order) {
|
||||
case EvoCw: return "cw";
|
||||
case EvoCcw: return "ccw";
|
||||
default: return "none";
|
||||
}
|
||||
}
|
||||
static int mapGeometryToSize(TLayoutGeometry geometry)
|
||||
{
|
||||
switch (geometry) {
|
||||
|
|
@ -421,11 +451,14 @@ public:
|
|||
// Qualifiers that don't need to be keep per object. They have shader scope, not object scope.
|
||||
// So, they will not be part of TType, TQualifier, etc.
|
||||
struct TShaderQualifiers {
|
||||
TLayoutGeometry geometry; // geometry shader in/out primitives
|
||||
TLayoutGeometry geometry; // geometry/tessellation shader in/out primitives
|
||||
bool pixelCenterInteger; // fragment shader
|
||||
bool originUpperLeft; // fragment shader
|
||||
int invocations; // 0 means no declaration
|
||||
int maxVertices;
|
||||
int vertices; // both for tessellation "vertices" and geometry "max_vertices"
|
||||
TVertexSpacing spacing;
|
||||
TVertexOrder order;
|
||||
bool pointMode;
|
||||
|
||||
void init()
|
||||
{
|
||||
|
|
@ -433,7 +466,10 @@ struct TShaderQualifiers {
|
|||
originUpperLeft = false;
|
||||
pixelCenterInteger = false;
|
||||
invocations = 0; // 0 means no declaration
|
||||
maxVertices = 0;
|
||||
vertices = 0;
|
||||
spacing = EvsNone;
|
||||
order = EvoNone;
|
||||
pointMode = false;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@
|
|||
// source have to figure out how to create revision.h just to get a build
|
||||
// going. However, if it is not updated, it can be a version behind.
|
||||
|
||||
#define GLSLANG_REVISION "24406"
|
||||
#define GLSLANG_DATE "2013/12/08 17:37:46"
|
||||
#define GLSLANG_REVISION "24420"
|
||||
#define GLSLANG_DATE "2013/12/09 17:25:14"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue