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:
parent
7111af423d
commit
dc3cfc9fa0
@ -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);
|
||||
|
||||
|
@ -180,6 +180,8 @@ namespace dxvk {
|
||||
|
||||
uint32_t builtinLaneId = 0;
|
||||
uint32_t killState = 0;
|
||||
|
||||
uint32_t specRsSampleCount = 0;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user