1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 22:24:15 +01:00

[dxbc] Use correct image query instructions for UAVs

May fix issues on Nvidia drivers.
This commit is contained in:
Philip Rebohle 2018-02-17 07:33:42 +01:00
parent fd1fd40ad6
commit be1cad34bf
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -4039,9 +4039,15 @@ namespace dxvk {
DxbcRegisterValue result; DxbcRegisterValue result;
result.type.ctype = DxbcScalarType::Uint32; result.type.ctype = DxbcScalarType::Uint32;
result.type.ccount = 1; result.type.ccount = 1;
result.id = m_module.opImageQueryLevels(
getVectorTypeId(result.type), if (info.image.sampled == 1) {
m_module.opLoad(info.typeId, info.varId)); result.id = m_module.opImageQueryLevels(
getVectorTypeId(result.type),
m_module.opLoad(info.typeId, info.varId));
} else {
// Report one LOD in case of UAVs
result.id = m_module.constu32(1);
}
return result; return result;
} }
@ -4069,7 +4075,7 @@ namespace dxvk {
result.type.ctype = DxbcScalarType::Uint32; result.type.ctype = DxbcScalarType::Uint32;
result.type.ccount = getTexCoordDim(info.image); result.type.ccount = getTexCoordDim(info.image);
if (info.image.ms == 0) { if (info.image.ms == 0 && info.image.sampled == 1) {
result.id = m_module.opImageQuerySizeLod( result.id = m_module.opImageQuerySizeLod(
getVectorTypeId(result.type), getVectorTypeId(result.type),
m_module.opLoad(info.typeId, info.varId), m_module.opLoad(info.typeId, info.varId),