Support for large textures Texture dimensions larger than SHRT_MAX (32767) were not supported by SwiftShader. Used integers instead of shorts to store texture sizes to increase the maximum texture size to INT_MAX (2147483647). Tests: dEQP-VK.memory.pipeline_barrier.host_write_uniform_texel_buffer.* Tests: dEQP-VK.memory.pipeline_barrier.transfer_dst_uniform_texel_buffer.* Bug b/133429305 Change-Id: I7913f5f4c1f933889e74c57851a837ad7982f87a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31989 Reviewed-by: Nicolas Capens <nicolascapens@google.com> Tested-by: Alexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Device/Sampler.hpp b/src/Device/Sampler.hpp index 8768a19..cbe29d8 100644 --- a/src/Device/Sampler.hpp +++ b/src/Device/Sampler.hpp
@@ -31,16 +31,12 @@ { const void *buffer[6]; - float4 fWidth; - float4 fHeight; - float4 fDepth; - short uHalf[4]; short vHalf[4]; short wHalf[4]; - short width[4]; - short height[4]; - short depth[4]; + int4 width; + int4 height; + int4 depth; short onePitchP[4]; int4 pitchP; int4 sliceP; @@ -154,6 +150,7 @@ VkCompareOp compareOp; VkBorderColor border; bool unnormalizedCoordinates; + bool largeTexture; #if PERF_PROFILE bool compressedFormat;