1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[dxbc] Use new spec constant API for rasterizer sample count

This commit is contained in:
Philip Rebohle 2019-04-30 21:07:52 +02:00
parent 7111af423d
commit dc3cfc9fa0
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 14 additions and 1 deletions

View File

@ -5069,7 +5069,18 @@ namespace dxvk {
if (resource.type == DxbcOperandType::Rasterizer) {
// SPIR-V has no gl_NumSamples equivalent, so we have
// to work around it using a specialization constant
return getSpecConstant(DxvkSpecConstantId::RasterizerSampleCount);
if (!m_ps.specRsSampleCount) {
m_ps.specRsSampleCount = emitNewSpecConstant(
DxvkSpecConstantId::RasterizerSampleCount,
DxbcScalarType::Uint32, 1,
"RasterizerSampleCount");
}
DxbcRegisterValue result;
result.type.ctype = DxbcScalarType::Uint32;
result.type.ccount = 1;
result.id = m_ps.specRsSampleCount;
return result;
} else {
DxbcBufferInfo info = getBufferInfo(resource);

View File

@ -180,6 +180,8 @@ namespace dxvk {
uint32_t builtinLaneId = 0;
uint32_t killState = 0;
uint32_t specRsSampleCount = 0;
};