mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-11 01:24:12 +01:00
[dxbc] Added support for early fragment tests
This commit is contained in:
parent
5a42512028
commit
b3ba401503
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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 =
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user