Merge pull request #551 from steve-lunarg/rwbuffers-fmt

HLSL: phase 3 of rwtexture support: add sub-vec4 capabilities
This commit is contained in:
John Kessenich
2016-10-15 23:03:38 -06:00
committed by GitHub
48 changed files with 6671 additions and 569 deletions

View File

@@ -78,6 +78,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
bool combined : 1; // true means texture is combined with a sampler, false means texture with no sampler
bool sampler : 1; // true means a pure sampler, other fields should be clear()
bool external : 1; // GL_OES_EGL_image_external
unsigned int vectorSize : 3; // return vector size. TODO: support arbitrary types.
bool isImage() const { return image && dim != EsdSubpass; }
bool isSubpass() const { return dim == EsdSubpass; }
@@ -99,6 +100,7 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
combined = false;
sampler = false;
external = false;
vectorSize = 4;
}
// make a combined sampler and texture
@@ -164,7 +166,8 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
image == right.image &&
combined == right.combined &&
sampler == right.sampler &&
external == right.external;
external == right.external &&
vectorSize == right.vectorSize;
}
bool operator!=(const TSampler& right) const

View File

@@ -1497,6 +1497,7 @@ void TShader::setShiftTextureBinding(unsigned int base) { intermediate->setShift
void TShader::setShiftUboBinding(unsigned int base) { intermediate->setShiftUboBinding(base); }
void TShader::setAutoMapBindings(bool map) { intermediate->setAutoMapBindings(map); }
void TShader::setFlattenUniformArrays(bool flatten) { intermediate->setFlattenUniformArrays(flatten); }
void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); }
//
// Turn the shader strings into a parse tree in the TIntermediate.

View File

@@ -146,7 +146,8 @@ public:
shiftTextureBinding(0),
shiftUboBinding(0),
autoMapBindings(false),
flattenUniformArrays(false)
flattenUniformArrays(false),
useUnknownFormat(false)
{
localSize[0] = 1;
localSize[1] = 1;
@@ -179,7 +180,9 @@ public:
bool getAutoMapBindings() const { return autoMapBindings; }
void setFlattenUniformArrays(bool flatten) { flattenUniformArrays = flatten; }
bool getFlattenUniformArrays() const { return flattenUniformArrays; }
void setNoStorageFormat(bool b) { useUnknownFormat = b; }
bool getNoStorageFormat() const { return useUnknownFormat; }
void setVersion(int v) { version = v; }
int getVersion() const { return version; }
void setProfile(EProfile p) { profile = p; }
@@ -397,6 +400,7 @@ protected:
unsigned int shiftUboBinding;
bool autoMapBindings;
bool flattenUniformArrays;
bool useUnknownFormat;
EProfile profile;
int version;

View File

@@ -309,6 +309,7 @@ public:
void setShiftUboBinding(unsigned int base);
void setAutoMapBindings(bool map);
void setFlattenUniformArrays(bool flatten);
void setNoStorageFormat(bool useUnknownFormat);
// Interface to #include handlers.
//