-
SpirvShaderDebugger: Fix store() of arrays · 51b03d58Ben Clayton authored
``` template<typename T, std::size_t N> void store(const rr::RValue<rr::Pointer<rr::Byte>> &ptr, const std::array<T, N> &val) ``` was completely broken as it was using `sizeof(T)` for element offsets. All uses of this overload use Reactor values for T, and so `sizeof(T)` evaluates to the size of the compiler type, not the runtime data type. Also remove the useless `for(int i = 0; i < N; i++)` in `buildGlobal()`. This iterator isn't used, so we're just doing the same calls to `put()` `N` times. Bug: b/170383642 Change-Id: I9ba9efce07e886087124118122de56a4d31c5503 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/49129 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by:
Nicolas Capens <nicolascapens@google.com> Tested-by:
Ben Clayton <bclayton@google.com>
51b03d58
×