aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-02-13 23:21:36 -0500
committerEmil Velikov <[email protected]>2015-02-24 12:16:12 +0000
commitc08e9605c2a71003359004c97392149267758a46 (patch)
treeb53c5fd0a8b017bf23c162ff5d0f308632fe22de
parentfe98850c5f4fed83dbe5e7b5633bef0459293c91 (diff)
nvc0: bail out of 2d blits with non-A8_UNORM alpha formats
This fixes the teximage-colors uploads with GL_ALPHA format and non-GL_UNSIGNED_BYTE type. Signed-off-by: Ilia Mirkin <[email protected]> Cc: "10.4 10.5" <[email protected]> (cherry picked from commit 68e4f3f572b1e629f32a73ae618dc0b016f631b1)
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_surface.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
index 4130d36afa1..4404d8c1a74 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c
@@ -1401,11 +1401,14 @@ nvc0_blit(struct pipe_context *pipe, const struct pipe_blit_info *info)
} else
if (!nv50_2d_src_format_faithful(info->src.format)) {
if (!util_format_is_luminance(info->src.format)) {
+ if (!nv50_2d_dst_format_ops_supported(info->dst.format))
+ eng3d = TRUE;
+ else
if (util_format_is_intensity(info->src.format))
eng3d = info->src.format != PIPE_FORMAT_I8_UNORM;
else
- if (!nv50_2d_dst_format_ops_supported(info->dst.format))
- eng3d = TRUE;
+ if (util_format_is_alpha(info->src.format))
+ eng3d = info->src.format != PIPE_FORMAT_A8_UNORM;
else
eng3d = !nv50_2d_format_supported(info->src.format);
}