aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r--mesalib/src/mesa/sources.mak1
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_texture.c11
2 files changed, 10 insertions, 2 deletions
diff --git a/mesalib/src/mesa/sources.mak b/mesalib/src/mesa/sources.mak
index 8cf629d16..e1598869c 100644
--- a/mesalib/src/mesa/sources.mak
+++ b/mesalib/src/mesa/sources.mak
@@ -254,6 +254,7 @@ PROGRAM_SOURCES = \
program/register_allocate.c \
program/symbol_table.c
+
SHADER_CXX_SOURCES = \
program/ir_to_mesa.cpp \
program/sampler.cpp
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c
index cea2a4a8d..17dab2f1a 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c
@@ -227,8 +227,15 @@ default_bindings(struct st_context *st, enum pipe_format format)
if (screen->is_format_supported(screen, format, target, 0, bindings, geom))
return bindings;
- else
- return PIPE_BIND_SAMPLER_VIEW;
+ else {
+ /* Try non-sRGB. */
+ format = util_format_linear(format);
+
+ if (screen->is_format_supported(screen, format, target, 0, bindings, geom))
+ return bindings;
+ else
+ return PIPE_BIND_SAMPLER_VIEW;
+ }
}