1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 19:24:12 +01:00

[dxbc] Added support for early fragment tests

This commit is contained in:
Philip Rebohle 2018-02-08 10:26:46 +01:00
parent 5a42512028
commit b3ba401503
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 7 additions and 1 deletions

View File

@ -256,7 +256,10 @@ namespace dxvk {
void DxbcCompiler::emitDclGlobalFlags(const DxbcShaderInstruction& ins) { void DxbcCompiler::emitDclGlobalFlags(const DxbcShaderInstruction& ins) {
// TODO implement properly const DxbcGlobalFlags flags = ins.controls.globalFlags;
if (flags.test(DxbcGlobalFlag::EarlyFragmentTests))
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeEarlyFragmentTests);
} }

View File

@ -106,6 +106,8 @@ namespace dxvk {
m_instruction.modifiers.precise = !!bit::extract(token, 19, 22); m_instruction.modifiers.precise = !!bit::extract(token, 19, 22);
// Opcode controls. It will depend on the opcode itself which ones are valid. // Opcode controls. It will depend on the opcode itself which ones are valid.
m_instruction.controls.globalFlags =
static_cast<DxbcGlobalFlag>(bit::extract(token, 11, 14));
m_instruction.controls.zeroTest = m_instruction.controls.zeroTest =
static_cast<DxbcZeroTest>(bit::extract(token, 18, 18)); static_cast<DxbcZeroTest>(bit::extract(token, 18, 18));
m_instruction.controls.syncFlags = m_instruction.controls.syncFlags =

View File

@ -242,6 +242,7 @@ namespace dxvk {
* only one of the members will be valid. * only one of the members will be valid.
*/ */
struct DxbcShaderOpcodeControls { struct DxbcShaderOpcodeControls {
DxbcGlobalFlags globalFlags;
DxbcZeroTest zeroTest; DxbcZeroTest zeroTest;
DxbcSyncFlags syncFlags; DxbcSyncFlags syncFlags;
DxbcResourceDim resourceDim; DxbcResourceDim resourceDim;