mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 19:24:12 +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:
|
case DxbcOpcode::DclMaxOutputVertexCount:
|
||||||
return this->emitDclMaxOutputVertexCount(ins);
|
return this->emitDclMaxOutputVertexCount(ins);
|
||||||
|
|
||||||
|
case DxbcOpcode::DclInputControlPointCount:
|
||||||
|
return this->emitDclInputControlPointCount(ins);
|
||||||
|
|
||||||
|
case DxbcOpcode::DclOutputControlPointCount:
|
||||||
|
return this->emitDclOutputControlPointCount(ins);
|
||||||
|
|
||||||
case DxbcOpcode::DclThreadGroup:
|
case DxbcOpcode::DclThreadGroup:
|
||||||
return this->emitDclThreadGroup(ins);
|
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) {
|
void DxbcCompiler::emitDclThreadGroup(const DxbcShaderInstruction& ins) {
|
||||||
// dcl_thread_group has three operands:
|
// dcl_thread_group has three operands:
|
||||||
// (imm0) Number of threads in X dimension
|
// (imm0) Number of threads in X dimension
|
||||||
|
@ -196,8 +196,11 @@ namespace dxvk {
|
|||||||
* \brief Hull shader-specific structure
|
* \brief Hull shader-specific structure
|
||||||
*/
|
*/
|
||||||
struct DxbcCompilerHsPart {
|
struct DxbcCompilerHsPart {
|
||||||
DxbcCompilerHsPhase currPhaseType = DxbcCompilerHsPhase::None;
|
DxbcCompilerHsPhase currPhaseType = DxbcCompilerHsPhase::None;
|
||||||
size_t currPhaseId = 0;
|
size_t currPhaseId = 0;
|
||||||
|
|
||||||
|
uint32_t vertexCountIn = 0;
|
||||||
|
uint32_t vertexCountOut = 0;
|
||||||
|
|
||||||
DxbcCompilerHsControlPointPhase cpPhase;
|
DxbcCompilerHsControlPointPhase cpPhase;
|
||||||
std::vector<DxbcCompilerHsForkJoinPhase> forkPhases;
|
std::vector<DxbcCompilerHsForkJoinPhase> forkPhases;
|
||||||
@ -455,6 +458,12 @@ namespace dxvk {
|
|||||||
void emitDclMaxOutputVertexCount(
|
void emitDclMaxOutputVertexCount(
|
||||||
const DxbcShaderInstruction& ins);
|
const DxbcShaderInstruction& ins);
|
||||||
|
|
||||||
|
void emitDclInputControlPointCount(
|
||||||
|
const DxbcShaderInstruction& ins);
|
||||||
|
|
||||||
|
void emitDclOutputControlPointCount(
|
||||||
|
const DxbcShaderInstruction& ins);
|
||||||
|
|
||||||
void emitDclThreadGroup(
|
void emitDclThreadGroup(
|
||||||
const DxbcShaderInstruction& ins);
|
const DxbcShaderInstruction& ins);
|
||||||
|
|
||||||
|
@ -124,6 +124,8 @@ namespace dxvk {
|
|||||||
static_cast<DxbcPrimitiveTopology>(bit::extract(token, 11, 17));
|
static_cast<DxbcPrimitiveTopology>(bit::extract(token, 11, 17));
|
||||||
m_instruction.controls.primitive =
|
m_instruction.controls.primitive =
|
||||||
static_cast<DxbcPrimitive>(bit::extract(token, 11, 16));
|
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
|
// Process extended opcode tokens
|
||||||
while (bit::extract(token, 31, 31)) {
|
while (bit::extract(token, 31, 31)) {
|
||||||
|
@ -251,6 +251,7 @@ namespace dxvk {
|
|||||||
DxbcSamplerMode samplerMode;
|
DxbcSamplerMode samplerMode;
|
||||||
DxbcPrimitiveTopology primitiveTopology;
|
DxbcPrimitiveTopology primitiveTopology;
|
||||||
DxbcPrimitive primitive;
|
DxbcPrimitive primitive;
|
||||||
|
uint32_t controlPointCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -716,9 +716,9 @@ namespace dxvk {
|
|||||||
/* DclInterface */
|
/* DclInterface */
|
||||||
{ },
|
{ },
|
||||||
/* DclInputControlPointCount */
|
/* DclInputControlPointCount */
|
||||||
{ },
|
{ 0, DxbcInstClass::Declaration },
|
||||||
/* DclOutputControlPointCount */
|
/* DclOutputControlPointCount */
|
||||||
{ },
|
{ 0, DxbcInstClass::Declaration },
|
||||||
/* DclTessDomain */
|
/* DclTessDomain */
|
||||||
{ },
|
{ },
|
||||||
/* DclTessPartitioning */
|
/* DclTessPartitioning */
|
||||||
|
Loading…
Reference in New Issue
Block a user