summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-07-12 13:55:26 -0700
committerJason Ekstrand <[email protected]>2018-07-13 20:57:46 -0700
commit11712b9ca17e4e1a819dcb7d020e19c6da77bc90 (patch)
tree007b1785645edc4ce8ba9844c141b256cbb0cb08
parent4ec8b39fcd8086ff73334dcb31491d907ac08e85 (diff)
intel/blorp: Fix blits to R8G8B8_UNORM_SRGB
In this case, the surface faking will give us a R8_UNORM surface and we need to do an sRGB conversion in the shader. Found by inspection. cc: [email protected] Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
-rw-r--r--src/intel/blorp/blorp_blit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index b144bddaf5d..f3896fe53f3 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -1951,6 +1951,10 @@ try_blorp_blit(struct blorp_batch *batch,
params->x0 *= 3;
params->x1 *= 3;
+ /* If it happens to be sRGB, we need to force a conversion */
+ if (params->dst.view.format == ISL_FORMAT_R8G8B8_UNORM_SRGB)
+ wm_prog_key->dst_format = ISL_FORMAT_R9G9B9E5_SHAREDEXP;
+
surf_fake_rgb_with_red(batch->blorp->isl_dev, &params->dst);
wm_prog_key->dst_rgb = true;