Centralise generation of buffer format strings for struct buffers

* We also fix a number of issues that could cause incorrect formats to be
  generated.
* Test cases added for D3D11/GL/Vulkan to test different struct types. These
  aren't automated at the moment because most of the code they're testing is in
  the UI itself.
This commit is contained in:
baldurk
2019-02-13 18:50:56 +00:00
parent 166bd285ae
commit bbc2f47fa8
18 changed files with 1134 additions and 547 deletions
+7 -7
View File
@@ -636,19 +636,19 @@ struct ShaderVariableDescriptor
return false;
}
DOCUMENT("The :class:`VarType` that this basic constant stores.");
VarType type;
VarType type = VarType::Unknown;
DOCUMENT("The number of rows in this matrix.");
uint8_t rows;
uint8_t rows = 1;
DOCUMENT("The number of columns in this matrix.");
uint8_t columns;
uint8_t columns = 1;
DOCUMENT("The number of bytes between the start of one column/row in a matrix and the next.");
uint8_t matrixByteStride;
uint8_t matrixByteStride = 0;
DOCUMENT("``True`` if the matrix is stored as row major instead of column major.");
bool rowMajorStorage;
bool rowMajorStorage = false;
DOCUMENT("The number of elements in the array, or 1 if it's not an array.");
uint32_t elements;
uint32_t elements = 1;
DOCUMENT("The number of bytes between the start of one element in the array and the next.");
uint32_t arrayByteStride;
uint32_t arrayByteStride = 0;
DOCUMENT("The name of the type of this constant, e.g. a ``struct`` name.");
rdcstr name;
};