summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorChristoph Bumiller <christoph.bumiller@speed.at>2013-04-12 13:42:01 +0200
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>2013-04-18 20:35:40 +0200
commit729abfd0f53c27ba58da95882bef985945933c65 (patch)
tree47623e71727be33fda952923809fb9b8391311ee /src/mesa/state_tracker/st_context.c
parent246ff8f887e10a2828fb43104a06ba6f2505b74d (diff)
downloadexternal_mesa3d-729abfd0f53c27ba58da95882bef985945933c65.zip
external_mesa3d-729abfd0f53c27ba58da95882bef985945933c65.tar.gz
external_mesa3d-729abfd0f53c27ba58da95882bef985945933c65.tar.bz2
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.
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 2042be3..ed1bf26 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -188,6 +188,10 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
st->needs_texcoord_semantic =
screen->get_param(screen, PIPE_CAP_TGSI_TEXCOORD);
+ st->apply_texture_swizzle_to_border_color =
+ !!(screen->get_param(screen, PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK) &
+ (PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 |
+ PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600));
/* GL limits and extensions */
st_init_limits(st);