summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index e51381b855f..fb9cb83c7bc 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -105,6 +105,13 @@ upload_default_color(struct brw_context *brw, struct gl_sampler_object *sampler,
color[3] = sampler->BorderColor.f[3];
}
+ /* In some cases we use an RGBA surface format for GL RGB textures,
+ * where we've initialized the A channel to 1.0. We also have to set
+ * the border color alpha to 1.0 in that case.
+ */
+ if (firstImage->_BaseFormat == GL_RGB)
+ color[3] = 1.0;
+
if (intel->gen == 5 || intel->gen == 6) {
struct gen5_sampler_default_color *sdc;