aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-13 17:04:47 +0100
committermarha <marha@users.sourceforge.net>2012-01-13 17:04:47 +0100
commite2e1bdced7e09e39fed613dae1f2f3096cb18118 (patch)
tree63c7066c79d1053c7656b6175e22e2ced6f11e01 /mesalib/src/mesa/state_tracker/st_extensions.c
parentcc96d00cae473f472e371328ce8dc572ad258073 (diff)
parent5cfbe97cd797d8f78ece208bb5114704b83d8aab (diff)
downloadvcxsrv-e2e1bdced7e09e39fed613dae1f2f3096cb18118.tar.gz
vcxsrv-e2e1bdced7e09e39fed613dae1f2f3096cb18118.tar.bz2
vcxsrv-e2e1bdced7e09e39fed613dae1f2f3096cb18118.zip
Merge remote-tracking branch 'origin/released'
Conflicts: libxcb/src/xcb_auth.c libxcb/src/xcb_conn.c libxcb/src/xcb_out.c libxcb/src/xcb_util.c xorg-server/dix/dispatch.c xorg-server/include/dixstruct.h xorg-server/include/misc.h xorg-server/os/connection.c
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_extensions.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index a9d405436..49c874710 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -263,12 +263,6 @@ void st_init_extensions(struct st_context *st)
ctx->Const.GLSLVersion = 120;
_mesa_override_glsl_version(st->ctx);
- /* Extensions that only depend on the GLSL version:
- */
- if (ctx->Const.GLSLVersion >= 130) {
- ctx->Extensions.ARB_conservative_depth = GL_TRUE;
- }
-
/*
* Extensions that are supported by all Gallium drivers:
*/
@@ -587,6 +581,23 @@ void st_init_extensions(struct st_context *st)
#endif
}
+ if (screen->get_shader_param(screen, PIPE_SHADER_VERTEX,
+ PIPE_SHADER_CAP_INTEGERS) &&
+ screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT,
+ PIPE_SHADER_CAP_INTEGERS)) {
+ ctx->Const.NativeIntegers = GL_TRUE;
+ }
+
+ if (ctx->Const.NativeIntegers)
+ ctx->Const.GLSLVersion = 130;
+
+ /* Extensions that only depend on the GLSL version:
+ */
+ if (ctx->Const.GLSLVersion >= 130) {
+ ctx->Extensions.ARB_conservative_depth = GL_TRUE;
+ ctx->Const.MaxClipPlanes = 8;
+ }
+
ctx->Extensions.NV_primitive_restart = GL_TRUE;
if (!screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART)) {
st->sw_primitive_restart = GL_TRUE;
@@ -703,4 +714,12 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_transform_feedback2 = GL_TRUE;
}
}
+
+ if (ctx->Const.NativeIntegers &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_UINT, PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET) &&
+ screen->is_format_supported(screen, PIPE_FORMAT_R32G32B32A32_SINT, PIPE_TEXTURE_2D, 0,
+ PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET))
+ ctx->Extensions.EXT_texture_integer = GL_TRUE;
+
}