[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
1 changed files with 10 additions and 4 deletions

View File

@ -4039,9 +4039,15 @@ namespace dxvk {
DxbcRegisterValue result;
result.type.ctype = DxbcScalarType::Uint32;
result.type.ccount = 1;
result.id = m_module.opImageQueryLevels(
getVectorTypeId(result.type),
m_module.opLoad(info.typeId, info.varId));
if (info.image.sampled == 1) {
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;
}
@ -4069,7 +4075,7 @@ namespace dxvk {
result.type.ctype = DxbcScalarType::Uint32;
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(
getVectorTypeId(result.type),
m_module.opLoad(info.typeId, info.varId),