We have to disallow the 8 and 16-bit 3-component formats for non-display target surfaces as we do for softpipe (see earlier commit). --- src/gallium/drivers/llvmpipe/lp_screen.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index fa43b72..56a3d47 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -293,8 +293,9 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_RESOURCE_FROM_USER_MEMORY: case PIPE_CAP_DEVICE_RESET_STATUS_QUERY: case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS: - case PIPE_CAP_COPY_IMAGE: return 0; + case PIPE_CAP_COPY_IMAGE: + return 1; } /* should only get here on unhandled cases */ debug_printf("Unexpected PIPE_CAP %d query\n", param); @@ -435,6 +436,27 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, } } + if ((bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW)) && + ((bind & PIPE_BIND_DISPLAY_TARGET) == 0)) { + if (format == PIPE_FORMAT_R8G8B8_UINT || + format == PIPE_FORMAT_R8G8B8_SINT || + format == PIPE_FORMAT_R8G8B8_UNORM || + format == PIPE_FORMAT_R16G16B16_UINT || + format == PIPE_FORMAT_R16G16B16_SINT || + format == PIPE_FORMAT_R16G16B16_UNORM || + format == PIPE_FORMAT_R16G16B16_FLOAT || + format == PIPE_FORMAT_R32G32B32_UINT || + format == PIPE_FORMAT_R32G32B32_SINT || + format == PIPE_FORMAT_R32G32B32_UNORM || + format == PIPE_FORMAT_R32G32B32_FLOAT) { + /* Don't support 3-component formats here since we don't support + * the 3-component UNORM formats. This allows GL_ARB_copy_image + * to work. + */ + return FALSE; + } + } + if (bind & PIPE_BIND_DISPLAY_TARGET) { if(!winsys->is_displaytarget_format_supported(winsys, bind, format)) return FALSE; -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev