summaryrefslogtreecommitdiffstats
path: root/src/glx/glxconfig.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2012-09-21 03:13:36 -0700
committerKenneth Graunke <[email protected]>2012-09-26 22:58:30 -0700
commit6d6aef79742ece3bb570ae44e6c13791aae15e01 (patch)
treebe2be5d9f04fa2fda8a8de8d1dc5be85a3977240 /src/glx/glxconfig.c
parentb5a042a657fed45264406cbd0d67fa6217a410a1 (diff)
i965: Do texture swizzling in hardware on Haswell.
Haswell supports EXT_texture_swizzle and legacy DEPTH_TEXTURE_MODE swizzling by setting SURFACE_STATE entries. This means we don't have to bake the swizzle settings into the shader code by emitting MOV instructions, and thus don't have to recompile shaders whenever the swizzles change. Unfortunately, we can't handle GL_ALPHA this way: unlike all the others, which store the comparison result in the .r channel (and possibly others as well), GL_ALPHA puts it in the .a channel. The GLSL 1.30+ style functions which return a float always simply return the .r channel, which would be zero if we handled this as a surface override. In this case, fall back to doing it the old way. DEPTH_TEXTURE_MODE = GL_ALPHA isn't an interesting performance path anyway. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glx/glxconfig.c')
0 files changed, 0 insertions, 0 deletions