diff options
author | Ilia Mirkin <[email protected]> | 2018-10-07 17:45:07 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2018-10-09 10:33:11 -0400 |
commit | 92f56fbd8969801fc88de606e1051dc397331e7d (patch) | |
tree | 54fb81c429199a98f63c6b01ae9f2646c959bac9 /src/gallium/drivers | |
parent | 9bf0614116cdfdbfca9952c6547331731a462dcc (diff) |
nvc0: fix blitting red to srgb8_alpha
For some reason the 2d engine can't handle this. Red formats get special
treatment there, so perhaps related.
Fixes dEQP-GLES3 tests of the form:
dEQP-GLES3.functional.fbo.blit.conversion.r{8,16f,32f}_to_srgb8_alpha8
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c index 120f9fe6ab9..03881c62785 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c @@ -1618,6 +1618,10 @@ nvc0_blit(struct pipe_context *pipe, const struct pipe_blit_info *info) if (util_format_is_alpha(info->src.format)) eng3d = info->src.format != PIPE_FORMAT_A8_UNORM; else + if (util_format_is_srgb(info->dst.format) && + util_format_get_nr_components(info->src.format) == 1) + eng3d = true; + else eng3d = !nv50_2d_format_supported(info->src.format); } } else |