mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 11:52:12 +01:00
[dxbc] Added support for SV_SampleIndex
This commit is contained in:
parent
0c62ca027f
commit
8a3dcf7c99
@ -4337,6 +4337,16 @@ namespace dxvk {
|
||||
return result;
|
||||
} 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:
|
||||
throw DxvkError(str::format(
|
||||
"DxbcCompiler: Unhandled PS SV input: ", sv));
|
||||
@ -4445,6 +4455,12 @@ namespace dxvk {
|
||||
spv::StorageClassInput },
|
||||
spv::BuiltInFrontFacing,
|
||||
"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 builtinDepth = 0;
|
||||
uint32_t builtinIsFrontFace = 0;
|
||||
uint32_t builtinSampleId = 0;
|
||||
|
||||
std::array<DxbcVectorType, DxbcMaxInterfaceRegs> oTypes;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user