Commit 44741083 by Ben Clayton

SpirvShader: Fix incorrect use of getPointer() with GetPointerToData()

Unlike getPointer() with just returns the raw pointer, GetPointerToData() derefs the buffer data for DescriptorSets. Test: dEQP-VK.spirv_assembly.instruction.compute.opcopymemory.struct Change-Id: I5d8d6139952673a2680f9e05f2f64785198b0797 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31110Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
parent b4001ed5
......@@ -2637,7 +2637,7 @@ namespace sw
case spv::StorageClassFunction:
{
bool interleavedByLane = IsStorageInterleavedByLane(objectTy.storageClass);
auto ptr = routine->getPointer(resultId);
auto ptr = GetPointerToData(resultId, 0, routine);
GenericValue initialValue(this, routine, initializerId);
VisitMemoryObject(resultId, [&](uint32_t i, uint32_t offset)
{
......@@ -5562,8 +5562,8 @@ namespace sw
bool dstInterleavedByLane = IsStorageInterleavedByLane(dstPtrTy.storageClass);
bool srcInterleavedByLane = IsStorageInterleavedByLane(srcPtrTy.storageClass);
auto dstPtr = state->routine->getPointer(dstPtrId);
auto srcPtr = state->routine->getPointer(srcPtrId);
auto dstPtr = GetPointerToData(dstPtrId, 0, state->routine);
auto srcPtr = GetPointerToData(srcPtrId, 0, state->routine);
std::unordered_map<uint32_t, uint32_t> srcOffsets;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment