mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-25 16:54:15 +01:00
[dxbc] Added support for SV_SampleIndex
This commit is contained in:
parent
0c62ca027f
commit
8a3dcf7c99
src/dxbc
@ -4337,6 +4337,16 @@ namespace dxvk {
|
|||||||
return result;
|
return result;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case DxbcSystemValue::SampleIndex: {
|
||||||
|
DxbcRegisterPointer ptrIn;
|
||||||
|
ptrIn.type.ctype = DxbcScalarType::Uint32;
|
||||||
|
ptrIn.type.ccount = 1;
|
||||||
|
ptrIn.id = m_ps.builtinSampleId;
|
||||||
|
|
||||||
|
return emitRegisterExtract(
|
||||||
|
emitValueLoad(ptrIn), mask);
|
||||||
|
} break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw DxvkError(str::format(
|
throw DxvkError(str::format(
|
||||||
"DxbcCompiler: Unhandled PS SV input: ", sv));
|
"DxbcCompiler: Unhandled PS SV input: ", sv));
|
||||||
@ -4445,6 +4455,12 @@ namespace dxvk {
|
|||||||
spv::StorageClassInput },
|
spv::StorageClassInput },
|
||||||
spv::BuiltInFrontFacing,
|
spv::BuiltInFrontFacing,
|
||||||
"ps_is_front_face");
|
"ps_is_front_face");
|
||||||
|
|
||||||
|
m_ps.builtinSampleId = emitNewBuiltinVariable({
|
||||||
|
{ DxbcScalarType::Uint32, 1, 0 },
|
||||||
|
spv::StorageClassInput },
|
||||||
|
spv::BuiltInSampleId,
|
||||||
|
"ps_sample_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ namespace dxvk {
|
|||||||
uint32_t builtinFragCoord = 0;
|
uint32_t builtinFragCoord = 0;
|
||||||
uint32_t builtinDepth = 0;
|
uint32_t builtinDepth = 0;
|
||||||
uint32_t builtinIsFrontFace = 0;
|
uint32_t builtinIsFrontFace = 0;
|
||||||
|
uint32_t builtinSampleId = 0;
|
||||||
|
|
||||||
std::array<DxbcVectorType, DxbcMaxInterfaceRegs> oTypes;
|
std::array<DxbcVectorType, DxbcMaxInterfaceRegs> oTypes;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user