Commit 6178ad2a by Nicolas Capens Committed by Nicolas Capens

Remove support for R16G16B16 and R32G32B32 sampling

These were implemented using 64-bit and 128-bit accesses, respectively, and thus cause both alignment and overflow issues. We weren't exposing support for them, so they can be removed for now instead of requiring an implementation which doesn't have these flaws. According to https://vulkan.gpuinfo.org/listformats.php, R16G16B16 is very rarely supported as an image format (but as a buffer format it is fairly common). R32G32B32 is very widely supported actually, due to being mandatory for Direct3D 10: https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/format-support-for-direct3d-feature-level-10-0-hardware#dxgi_format_r32g32b32_typelesspcs-5 Bug: b/146387550 Change-Id: Ife0a1786a5228c872c3585403ab1ce47eafb4ce5 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51088 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 01f73074
...@@ -1672,13 +1672,6 @@ Vector4s SamplerCore::sampleTexel(UInt index[4], Pointer<Byte> buffer) ...@@ -1672,13 +1672,6 @@ Vector4s SamplerCore::sampleTexel(UInt index[4], Pointer<Byte> buffer)
c.w = Pointer<Short4>(buffer)[index[3]]; c.w = Pointer<Short4>(buffer)[index[3]];
transpose4x4(c.x, c.y, c.z, c.w); transpose4x4(c.x, c.y, c.z, c.w);
break; break;
case 3:
c.x = Pointer<Short4>(buffer)[index[0]];
c.y = Pointer<Short4>(buffer)[index[1]];
c.z = Pointer<Short4>(buffer)[index[2]];
c.w = Pointer<Short4>(buffer)[index[3]];
transpose4x3(c.x, c.y, c.z, c.w);
break;
case 2: case 2:
c.x = *Pointer<Short4>(buffer + 4 * index[0]); c.x = *Pointer<Short4>(buffer + 4 * index[0]);
c.x = As<Short4>(UnpackLow(c.x, *Pointer<Short4>(buffer + 4 * index[1]))); c.x = As<Short4>(UnpackLow(c.x, *Pointer<Short4>(buffer + 4 * index[1])));
...@@ -1995,15 +1988,6 @@ Vector4f SamplerCore::sampleTexel(Int4 &uuuu, Int4 &vvvv, Int4 &wwww, Float4 &dR ...@@ -1995,15 +1988,6 @@ Vector4f SamplerCore::sampleTexel(Int4 &uuuu, Int4 &vvvv, Int4 &wwww, Float4 &dR
c.x = Float4(c.x.xz, c.z.xz); c.x = Float4(c.x.xz, c.z.xz);
c.y = Float4(c.y.yw, c.z.yw); c.y = Float4(c.y.yw, c.z.yw);
break; break;
case VK_FORMAT_R32G32B32_SFLOAT:
case VK_FORMAT_R32G32B32_SINT:
case VK_FORMAT_R32G32B32_UINT:
c.x = *Pointer<Float4>(buffer + index[0] * 16, 16);
c.y = *Pointer<Float4>(buffer + index[1] * 16, 16);
c.z = *Pointer<Float4>(buffer + index[2] * 16, 16);
c.w = *Pointer<Float4>(buffer + index[3] * 16, 16);
transpose4x3(c.x, c.y, c.z, c.w);
break;
case VK_FORMAT_R32G32B32A32_SFLOAT: case VK_FORMAT_R32G32B32A32_SFLOAT:
case VK_FORMAT_R32G32B32A32_SINT: case VK_FORMAT_R32G32B32A32_SINT:
case VK_FORMAT_R32G32B32A32_UINT: case VK_FORMAT_R32G32B32A32_UINT:
......
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