Commit ab849aec by Alexis Hetu Committed by Alexis Hétu

Remove redundant R5G6R5 conversions

The code to compute the final RGB565 conversion is now generated once instead of being generated 4 times. Change-Id: Id90ddd28d6ec4fb957d8093e6b9689462751002b Reviewed-on: https://swiftshader-review.googlesource.com/10609Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 6b064940
...@@ -360,8 +360,6 @@ namespace sw ...@@ -360,8 +360,6 @@ namespace sw
sampleTexture(texture, cs, u, v, w, q, dsx, dsy, offset, function, false); sampleTexture(texture, cs, u, v, w, q, dsx, dsy, offset, function, false);
for(int component = 0; component < textureComponentCount(); component++)
{
if(has16bitTextureFormat()) if(has16bitTextureFormat())
{ {
switch(state.textureFormat) switch(state.textureFormat)
...@@ -390,6 +388,8 @@ namespace sw ...@@ -390,6 +388,8 @@ namespace sw
} }
else else
{ {
for(int component = 0; component < textureComponentCount(); component++)
{
switch(state.textureFormat) switch(state.textureFormat)
{ {
case FORMAT_R8I: case FORMAT_R8I:
......
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