From 729abfd0f53c27ba58da95882bef985945933c65 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Fri, 12 Apr 2013 13:42:01 +0200 Subject: st/mesa: optionally apply texture swizzle to border color v2 This is the only sane solution for nv50 and nvc0 (really, trust me), but since on other hardware the border colour is tightly coupled with texture state they'd have to undo the swizzle, so I've added a cap. The dependency of update_sampler on the texture updates was introduced to avoid doing the apply_depthmode to the swizzle twice. v2: Moved swizzling helper to u_format.c, extended the CAP to provide more accurate information. --- src/gallium/include/pipe/p_defines.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gallium/include/pipe') diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 5b00acc7418..2d38ce1a8c4 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -505,9 +505,14 @@ enum pipe_cap { PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 78, PIPE_CAP_TGSI_TEXCOORD = 79, PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER = 80, - PIPE_CAP_QUERY_PIPELINE_STATISTICS = 81 + PIPE_CAP_QUERY_PIPELINE_STATISTICS = 81, + PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK = 82 }; +#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0) +#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600 (1 << 1) + + /** * Implementation limits which are queried through * pipe_screen::get_paramf() -- cgit v1.2.3