summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/intel_extensions.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-02-23 21:59:25 -0800
committerKenneth Graunke <kenneth@whitecape.org>2014-03-04 17:23:03 -0800
commitdfa1ab0e52dde185c80f83b8e354a821f46c2949 (patch)
treeb33e73d8593b511a3652d935a0e1042dcd1faee3 /src/mesa/drivers/dri/i965/intel_extensions.c
parent23e81b93bbe3966a842de507988eeaa7342e12ca (diff)
downloadexternal_mesa3d-dfa1ab0e52dde185c80f83b8e354a821f46c2949.zip
external_mesa3d-dfa1ab0e52dde185c80f83b8e354a821f46c2949.tar.gz
external_mesa3d-dfa1ab0e52dde185c80f83b8e354a821f46c2949.tar.bz2
i965: Implement ARB_stencil_texturing on Gen8+.
On earlier hardware, we had to implement math in the shader to translate Y-tiled or untiled coordinates to W-tiled coordinates (which is what BLORP does today in order to texture from stencil buffers). On Broadwell, we can simply state that it's W-tiled in SURFACE_STATE, and adjust the pitch. This is much easier. In the surface state code, I chose to handle the "should we sample depth or stencil?" question separately from the setup for sampling from stencil. This should make it work with the BindRenderbufferTexImage hook as well, and hopefully be reusable for GL_ARB_texture_stencil8 someday. v2: Update docs/GL3.txt (caught by Matt). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_extensions.c')
-rw-r--r--src/mesa/drivers/dri/i965/intel_extensions.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index ef9aa55..5094c2b 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -303,6 +303,10 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.ARB_compute_shader = true;
}
+ if (brw->gen >= 8) {
+ ctx->Extensions.ARB_stencil_texturing = true;
+ }
+
if (brw->gen == 5 || can_write_oacontrol(brw))
ctx->Extensions.AMD_performance_monitor = true;