mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxbc] Do not set ImageOperandsLodMask for multisample loads
This should fix invalid SPIR-V being generated in The Witness.
This commit is contained in:
parent
3bb7b45c33
commit
aa02612b9e
@ -2327,8 +2327,9 @@ namespace dxvk {
|
|||||||
imageLayerDim, offsetIds.data());
|
imageLayerDim, offsetIds.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
// The LOD is not present when reading from a buffer
|
// The LOD is not present when reading from
|
||||||
if (imageType.dim != spv::DimBuffer) {
|
// a buffer or from a multisample texture.
|
||||||
|
if (imageType.dim != spv::DimBuffer && imageType.ms == 0) {
|
||||||
DxbcRegisterValue imageLod = emitRegisterExtract(
|
DxbcRegisterValue imageLod = emitRegisterExtract(
|
||||||
address, DxbcRegMask(false, false, false, true));
|
address, DxbcRegMask(false, false, false, true));
|
||||||
|
|
||||||
@ -2336,8 +2337,8 @@ namespace dxvk {
|
|||||||
imageOperands.sLod = imageLod.id;
|
imageOperands.sLod = imageLod.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The ld2ms instruction also has a sample index, but
|
// The ld2ms instruction has a sample index, but we
|
||||||
// we are only allowed to set it for multisample views
|
// are only allowed to set it for multisample views
|
||||||
if (ins.op == DxbcOpcode::LdMs && imageType.ms == 1) {
|
if (ins.op == DxbcOpcode::LdMs && imageType.ms == 1) {
|
||||||
DxbcRegisterValue sampleId = emitRegisterLoad(
|
DxbcRegisterValue sampleId = emitRegisterLoad(
|
||||||
ins.src[2], DxbcRegMask(true, false, false, false));
|
ins.src[2], DxbcRegMask(true, false, false, false));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user