[D3D12] DXBC dcl_constantbuffer

This commit is contained in:
Triang3l
2018-08-30 19:01:05 +03:00
parent aac20b6f91
commit 8d7559f0f9
2 changed files with 75 additions and 4 deletions

View File

@@ -95,6 +95,10 @@ class DxbcShaderTranslator : public ShaderTranslator {
static constexpr uint32_t kPSInPositionRegister =
kPSInPointParametersRegister + 1;
// 4 tokens emitted to shader_object_ (NOT shader_code_).
void EmitDclResourceOperand(uint32_t type, uint32_t id, uint32_t lower_bound,
uint32_t upper_bound);
void EmitRet();
// Writes the epilogue.
@@ -222,6 +226,11 @@ class DxbcShaderTranslator : public ShaderTranslator {
static const RdefConstantBuffer
rdef_constant_buffers_[size_t(RdefConstantBufferIndex::kCount)];
// Order of dcl_constantbuffer instructions, from most frequenly accessed to
// least frequently accessed (hint to driver according to the DXBC header).
static const RdefConstantBufferIndex
constant_buffer_dcl_order_[size_t(RdefConstantBufferIndex::kCount)];
bool writes_depth_;
// The STAT chunk (based on Wine d3dcompiler_parse_stat).