mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-30 22:24:15 +01:00
[dxbc] Implemented Hull Shader control point count declarations
This commit is contained in:
parent
0916115086
commit
feba1f0e88
@ -254,6 +254,12 @@ namespace dxvk {
|
||||
case DxbcOpcode::DclMaxOutputVertexCount:
|
||||
return this->emitDclMaxOutputVertexCount(ins);
|
||||
|
||||
case DxbcOpcode::DclInputControlPointCount:
|
||||
return this->emitDclInputControlPointCount(ins);
|
||||
|
||||
case DxbcOpcode::DclOutputControlPointCount:
|
||||
return this->emitDclOutputControlPointCount(ins);
|
||||
|
||||
case DxbcOpcode::DclThreadGroup:
|
||||
return this->emitDclThreadGroup(ins);
|
||||
|
||||
@ -1055,6 +1061,17 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void DxbcCompiler::emitDclInputControlPointCount(const DxbcShaderInstruction& ins) {
|
||||
m_hs.vertexCountIn = ins.controls.controlPointCount;
|
||||
}
|
||||
|
||||
|
||||
void DxbcCompiler::emitDclOutputControlPointCount(const DxbcShaderInstruction& ins) {
|
||||
m_module.setOutputVertices(m_entryPointId, ins.controls.controlPointCount);
|
||||
m_hs.vertexCountOut = ins.controls.controlPointCount;
|
||||
}
|
||||
|
||||
|
||||
void DxbcCompiler::emitDclThreadGroup(const DxbcShaderInstruction& ins) {
|
||||
// dcl_thread_group has three operands:
|
||||
// (imm0) Number of threads in X dimension
|
||||
|
@ -196,8 +196,11 @@ namespace dxvk {
|
||||
* \brief Hull shader-specific structure
|
||||
*/
|
||||
struct DxbcCompilerHsPart {
|
||||
DxbcCompilerHsPhase currPhaseType = DxbcCompilerHsPhase::None;
|
||||
size_t currPhaseId = 0;
|
||||
DxbcCompilerHsPhase currPhaseType = DxbcCompilerHsPhase::None;
|
||||
size_t currPhaseId = 0;
|
||||
|
||||
uint32_t vertexCountIn = 0;
|
||||
uint32_t vertexCountOut = 0;
|
||||
|
||||
DxbcCompilerHsControlPointPhase cpPhase;
|
||||
std::vector<DxbcCompilerHsForkJoinPhase> forkPhases;
|
||||
@ -455,6 +458,12 @@ namespace dxvk {
|
||||
void emitDclMaxOutputVertexCount(
|
||||
const DxbcShaderInstruction& ins);
|
||||
|
||||
void emitDclInputControlPointCount(
|
||||
const DxbcShaderInstruction& ins);
|
||||
|
||||
void emitDclOutputControlPointCount(
|
||||
const DxbcShaderInstruction& ins);
|
||||
|
||||
void emitDclThreadGroup(
|
||||
const DxbcShaderInstruction& ins);
|
||||
|
||||
|
@ -124,6 +124,8 @@ namespace dxvk {
|
||||
static_cast<DxbcPrimitiveTopology>(bit::extract(token, 11, 17));
|
||||
m_instruction.controls.primitive =
|
||||
static_cast<DxbcPrimitive>(bit::extract(token, 11, 16));
|
||||
m_instruction.controls.controlPointCount =
|
||||
static_cast<uint32_t>(bit::extract(token, 11, 16));
|
||||
|
||||
// Process extended opcode tokens
|
||||
while (bit::extract(token, 31, 31)) {
|
||||
|
@ -251,6 +251,7 @@ namespace dxvk {
|
||||
DxbcSamplerMode samplerMode;
|
||||
DxbcPrimitiveTopology primitiveTopology;
|
||||
DxbcPrimitive primitive;
|
||||
uint32_t controlPointCount;
|
||||
};
|
||||
|
||||
|
||||
|
@ -716,9 +716,9 @@ namespace dxvk {
|
||||
/* DclInterface */
|
||||
{ },
|
||||
/* DclInputControlPointCount */
|
||||
{ },
|
||||
{ 0, DxbcInstClass::Declaration },
|
||||
/* DclOutputControlPointCount */
|
||||
{ },
|
||||
{ 0, DxbcInstClass::Declaration },
|
||||
/* DclTessDomain */
|
||||
{ },
|
||||
/* DclTessPartitioning */
|
||||
|
Loading…
Reference in New Issue
Block a user