mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-29 17:52:18 +01:00
[dxbc] Fixed OpImageRead and OpImageWrite operand types
This commit is contained in:
parent
7aed861862
commit
5df89fb657
@ -2681,9 +2681,10 @@ namespace dxvk {
|
|||||||
SpirvImageOperands()), 1, &zero);
|
SpirvImageOperands()), 1, &zero);
|
||||||
|
|
||||||
case DxbcOperandType::UnorderedAccessView:
|
case DxbcOperandType::UnorderedAccessView:
|
||||||
return m_module.opImageRead(
|
return m_module.opCompositeExtract(scalarTypeId,
|
||||||
scalarTypeId, bufferId, elementIndexAdjusted,
|
m_module.opImageRead(vectorTypeId,
|
||||||
SpirvImageOperands());
|
bufferId, elementIndexAdjusted,
|
||||||
|
SpirvImageOperands()), 1, &zero);
|
||||||
|
|
||||||
case DxbcOperandType::ThreadGroupSharedMemory:
|
case DxbcOperandType::ThreadGroupSharedMemory:
|
||||||
return m_module.opLoad(scalarTypeId,
|
return m_module.opLoad(scalarTypeId,
|
||||||
@ -2730,7 +2731,8 @@ namespace dxvk {
|
|||||||
const uint32_t bufferId = isTgsm
|
const uint32_t bufferId = isTgsm
|
||||||
? 0 : m_module.opLoad(bufferInfo.typeId, bufferInfo.varId);
|
? 0 : m_module.opLoad(bufferInfo.typeId, bufferInfo.varId);
|
||||||
|
|
||||||
const uint32_t scalarTypeId = getScalarTypeId(DxbcScalarType::Uint32);
|
const uint32_t scalarTypeId = getVectorTypeId({ DxbcScalarType::Uint32, 1 });
|
||||||
|
const uint32_t vectorTypeId = getVectorTypeId({ DxbcScalarType::Uint32, 4 });
|
||||||
|
|
||||||
uint32_t srcComponentIndex = 0;
|
uint32_t srcComponentIndex = 0;
|
||||||
|
|
||||||
@ -2748,12 +2750,18 @@ namespace dxvk {
|
|||||||
: elementIndex.id;
|
: elementIndex.id;
|
||||||
|
|
||||||
switch (operand.type) {
|
switch (operand.type) {
|
||||||
case DxbcOperandType::UnorderedAccessView:
|
case DxbcOperandType::UnorderedAccessView: {
|
||||||
|
const std::array<uint32_t, 4> srcVectorIds = {
|
||||||
|
srcComponentId, srcComponentId,
|
||||||
|
srcComponentId, srcComponentId,
|
||||||
|
};
|
||||||
|
|
||||||
m_module.opImageWrite(
|
m_module.opImageWrite(
|
||||||
bufferId, elementIndexAdjusted,
|
bufferId, elementIndexAdjusted,
|
||||||
srcComponentId,
|
m_module.opCompositeConstruct(vectorTypeId,
|
||||||
|
4, srcVectorIds.data()),
|
||||||
SpirvImageOperands());
|
SpirvImageOperands());
|
||||||
break;
|
} break;
|
||||||
|
|
||||||
case DxbcOperandType::ThreadGroupSharedMemory:
|
case DxbcOperandType::ThreadGroupSharedMemory:
|
||||||
m_module.opStore(
|
m_module.opStore(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user