Mesa (master): st/mesa: simplify enabling EXT_packed_depth_stencil and ARB_fbo
Marek Olšák
mareko at kemper.freedesktop.org
Wed Jan 25 11:51:05 UTC 2012
Module: Mesa
Branch: master
Commit: 925fd2e1ddf9fbeb1d21a9b1223fe6fc13192dc7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=925fd2e1ddf9fbeb1d21a9b1223fe6fc13192dc7
Author: Marek Olšák <maraeo at gmail.com>
Date: Sun Jan 22 18:27:40 2012 +0100
st/mesa: simplify enabling EXT_packed_depth_stencil and ARB_fbo
- use OR to combine bind flags
- combine both conditionals into one
- move the ARB_fbo enable where it belongs
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/mesa/state_tracker/st_extensions.c | 21 +++++----------------
1 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 1f3b59f..527e56d 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -387,19 +387,14 @@ void st_init_extensions(struct st_context *st)
*/
if (screen->is_format_supported(screen, PIPE_FORMAT_S8_UINT_Z24_UNORM,
PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL) &&
- screen->is_format_supported(screen, PIPE_FORMAT_S8_UINT_Z24_UNORM,
+ PIPE_BIND_DEPTH_STENCIL |
+ PIPE_BIND_SAMPLER_VIEW) ||
+ screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_UINT,
PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_DEPTH_STENCIL |
PIPE_BIND_SAMPLER_VIEW)) {
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
- }
- else if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_UINT,
- PIPE_TEXTURE_2D, 0,
- PIPE_BIND_DEPTH_STENCIL) &&
- screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_UINT,
- PIPE_TEXTURE_2D, 0,
- PIPE_BIND_SAMPLER_VIEW)) {
- ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
+ ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
}
/* float support - assume nothing exclusively supports 64-bit floats */
@@ -516,12 +511,6 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.MESA_texture_array = GL_TRUE;
}
- /* GL_ARB_framebuffer_object */
- if (ctx->Extensions.EXT_packed_depth_stencil) {
- /* we support always support GL_EXT_framebuffer_blit */
- ctx->Extensions.ARB_framebuffer_object = GL_TRUE;
- }
-
if (screen->get_param(screen, PIPE_CAP_CONDITIONAL_RENDER)) {
ctx->Extensions.NV_conditional_render = GL_TRUE;
}
More information about the mesa-commit
mailing list