[D3D12] DXBC: Fix UAV and sampler operands

This commit is contained in:
Triang3l
2018-12-22 14:26:18 +03:00
parent 6025599d3b
commit 645f450321
5 changed files with 23 additions and 18 deletions

View File

@@ -727,6 +727,15 @@ class DxbcShaderTranslator : public ShaderTranslator {
// Operand encoding, with 32-bit immediate indices by default. None of the
// arguments must be shifted when calling.
static constexpr uint32_t EncodeZeroComponentOperand(
uint32_t type, uint32_t index_dimension,
uint32_t index_representation_0 = 0, uint32_t index_representation_1 = 0,
uint32_t index_representation_2 = 0) {
// D3D10_SB_OPERAND_0_COMPONENT.
return 0 | (type << 12) | (index_dimension << 20) |
(index_representation_0 << 22) | (index_representation_1 << 25) |
(index_representation_0 << 28);
}
static constexpr uint32_t EncodeScalarOperand(
uint32_t type, uint32_t index_dimension,
uint32_t index_representation_0 = 0, uint32_t index_representation_1 = 0,