From 47cad5f0d6966f59ab8faf6373e42873431801f2 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 16 Jan 2018 23:14:32 -0800 Subject: [PATCH] HACK --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index adf60a8..976abe5 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -464,6 +464,7 @@ brw_update_texture_surface(struct gl_context *ctx, uint32_t *surf_offset, bool for_gather, bool for_txf, + bool shadow, uint32_t plane) { struct brw_context *brw = brw_context(ctx); @@ -550,6 +551,9 @@ brw_update_texture_surface(struct gl_context *ctx, } } + if (shadow && format == ISL_FORMAT_R8G8B8A8_UNORM) + format = ISL_FORMAT_R32_FLOAT; + if (obj->StencilSampling && firstImage->_BaseFormat == GL_DEPTH_STENCIL) { if (devinfo->gen <= 7) { assert(mt->r8stencil_mt && !mt->stencil_mt->r8stencil_needs_update); @@ -1121,11 +1125,12 @@ update_stage_texture_surfaces(struct brw_context *brw, if (prog->SamplersUsed & (1 << s)) { const unsigned unit = prog->SamplerUnits[s]; const bool used_by_txf = prog->info.textures_used_by_txf & (1 << s); + const bool shadow = prog->ShadowSamplers & (1 << s); /* _NEW_TEXTURE */ if (ctx->Texture.Unit[unit]._Current) { brw_update_texture_surface(ctx, unit, surf_offset + s, for_gather, - used_by_txf, plane); + used_by_txf, shadow, plane); } } } -- 2.5.0.400.gff86faf