diff options
author | Neil Roberts <neil@linux.intel.com> | 2014-06-10 16:21:21 +0100 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2014-07-23 11:50:38 +0100 |
commit | 0779f37e1589b0ba4f1443a889f34dd83607c117 (patch) | |
tree | 871274c17a6b5c95ae1b22f601890171b4b6b230 /src/mesa/drivers/dri | |
parent | 05b52efbc977311c96ba31ac5fa2c95fe525d85e (diff) | |
download | external_mesa3d-0779f37e1589b0ba4f1443a889f34dd83607c117.zip external_mesa3d-0779f37e1589b0ba4f1443a889f34dd83607c117.tar.gz external_mesa3d-0779f37e1589b0ba4f1443a889f34dd83607c117.tar.bz2 |
meta: Add a meta implementation of GL_ARB_clear_texture
Adds an implementation of the ClearTexSubImage driver entry point that tries
to set up an FBO to render to the texture and then calls glClearBuffer with a
scissor to perform the actual clear. If an FBO can't be created for the
texture then it will fall back to using _mesa_store_ClearTexSubImage.
When used in combination with _mesa_store_ClearTexSubImage this should provide
an implementation that works for all DRI-based drivers. However as this has
only been tested with the i965 driver it is currently only enabled there.
v2: Only enable the extension for the i965 driver instead of all DRI drivers.
Remove an unnecessary goto. Don't require GL_ARB_framebuffer_object. Add
some more comments.
v3: Use glClearBuffer* to avoid having to modify glClearColor and friends.
Handle sRGB textures. Explicitly disable dithering.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_extensions.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index fe40068..4ee8636 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -163,6 +163,7 @@ intelInitExtensions(struct gl_context *ctx) assert(brw->gen >= 4); ctx->Extensions.ARB_buffer_storage = true; + ctx->Extensions.ARB_clear_texture = true; ctx->Extensions.ARB_depth_buffer_float = true; ctx->Extensions.ARB_depth_clamp = true; ctx->Extensions.ARB_depth_texture = true; |