Commit 337f3d58 by Alexis Hetu Committed by Alexis Hétu

RGB32F texture sampling fix

A cl recently introduced the XRB32F internal format, but while it fixed some cases where this format is used as a rendertarget, it seems to have caused regressions in sampling. A new case has been added in the sampling code to handle this new format properly. Change-Id: I7aa537a410d7b68c47771a72dec487e4b4c4e8be Reviewed-on: https://swiftshader-review.googlesource.com/5147Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 6edaa888
...@@ -1950,6 +1950,15 @@ namespace sw ...@@ -1950,6 +1950,15 @@ namespace sw
c.w = *Pointer<Float4>(buffer[f3] + index[3] * 16, 16); c.w = *Pointer<Float4>(buffer[f3] + index[3] * 16, 16);
transpose4x4(c.x, c.y, c.z, c.w); transpose4x4(c.x, c.y, c.z, c.w);
break; break;
case 3:
ASSERT(state.textureFormat == FORMAT_X32B32G32R32F);
c.x = *Pointer<Float4>(buffer[f0] + index[0] * 16, 16);
c.y = *Pointer<Float4>(buffer[f1] + index[1] * 16, 16);
c.z = *Pointer<Float4>(buffer[f2] + index[2] * 16, 16);
c.w = *Pointer<Float4>(buffer[f3] + index[3] * 16, 16);
transpose4x3(c.x, c.y, c.z, c.w);
c.w = Float4(1.0f);
break;
case 2: case 2:
// FIXME: Optimal shuffling? // FIXME: Optimal shuffling?
c.x.xy = *Pointer<Float4>(buffer[f0] + index[0] * 8); c.x.xy = *Pointer<Float4>(buffer[f0] + index[0] * 8);
......
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