Ilia Mirkin
2015-Feb-14 04:23 UTC
[Nouveau] [PATCH] 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 <imirkin at alum.mit.edu> --- src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 7 +++++-- 1 file 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 4130d36..4404d8c 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); } -- 2.0.5
Apparently Analagous Threads
- About Porting Android to nouveau
- [PATCH] nv50,nvc0: fix 3d blits with mipmap levels
- [PATCH] drm/nouveau: bail out of nouveau_channel_new if channel init fails
- [PATCH 0/2] nv50, nvc0: fix weirdo zs formats and their blits
- [PATCH] drm/nouveau: bail out of nouveau_channel_new if channel init fails