aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c4
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c12
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
3 files changed, 11 insertions, 7 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index afc6d9dab..928a4ffd2 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -271,6 +271,10 @@ st_get_texture_sampler_view_from_stobj(struct st_context *st,
sv = st_texture_get_sampler_view(st, stObj);
+ if (stObj->base.StencilSampling &&
+ util_format_is_depth_and_stencil(format))
+ format = util_format_stencil_only(format);
+
/* if sampler view has changed dereference it */
if (*sv) {
if (check_sampler_swizzle(stObj, *sv) ||
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index a245fdf18..12ba82df3 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -507,6 +507,11 @@ void st_init_extensions(struct st_context *st)
{ { o(OES_compressed_ETC1_RGB8_texture) },
{ PIPE_FORMAT_ETC1_RGB8 } },
+
+ { { o(ARB_stencil_texturing) },
+ { PIPE_FORMAT_X24S8_UINT,
+ PIPE_FORMAT_S8X24_UINT },
+ GL_TRUE }, /* at least one format must be supported */
};
/* Required: vertex fetch support. */
@@ -560,13 +565,6 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.EXT_point_parameters = GL_TRUE;
ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
- /* IMPORTANT:
- * Don't enable EXT_separate_shader_objects. It disallows a certain
- * optimization in the GLSL compiler and therefore is considered
- * harmful.
- */
- ctx->Extensions.EXT_separate_shader_objects = GL_FALSE;
-
ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE;
ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index d1c3856b5..6eb6c8a97 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5396,6 +5396,8 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
EXP_TO_EXP2 |
LOG_TO_LOG2 |
LDEXP_TO_ARITH |
+ CARRY_TO_ARITH |
+ BORROW_TO_ARITH |
(options->EmitNoPow ? POW_TO_EXP2 : 0) |
(!ctx->Const.NativeIntegers ? INT_DIV_TO_MUL_RCP : 0));