pan/midgard: Fix old style shadows

This fixes the sky being red in OpenMW, as well as some of the Mesa
demos using shadows (shadowtex, shadow_sampler).

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4997>
This commit is contained in:
Icecream95 2020-05-12 10:16:31 +12:00
parent 47bfc799da
commit d1290e7948

View file

@ -1759,6 +1759,10 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr,
}
};
if (instr->is_shadow && !instr->is_new_style_shadow)
for (int i = 0; i < 4; ++i)
ins.swizzle[0][i] = COMPONENT_X;
/* We may need a temporary for the coordinate */
bool needs_temp_coord =