mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 02:52:10 +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());
|
||||
}
|
||||
|
||||
// The LOD is not present when reading from a buffer
|
||||
if (imageType.dim != spv::DimBuffer) {
|
||||
// The LOD is not present when reading from
|
||||
// a buffer or from a multisample texture.
|
||||
if (imageType.dim != spv::DimBuffer && imageType.ms == 0) {
|
||||
DxbcRegisterValue imageLod = emitRegisterExtract(
|
||||
address, DxbcRegMask(false, false, false, true));
|
||||
|
||||
@ -2336,8 +2337,8 @@ namespace dxvk {
|
||||
imageOperands.sLod = imageLod.id;
|
||||
}
|
||||
|
||||
// The ld2ms instruction also has a sample index, but
|
||||
// we are only allowed to set it for multisample views
|
||||
// The ld2ms instruction has a sample index, but we
|
||||
// are only allowed to set it for multisample views
|
||||
if (ins.op == DxbcOpcode::LdMs && imageType.ms == 1) {
|
||||
DxbcRegisterValue sampleId = emitRegisterLoad(
|
||||
ins.src[2], DxbcRegMask(true, false, false, false));
|
||||
|
Loading…
x
Reference in New Issue
Block a user