diff options
author | Iago Toral Quiroga <itoral@igalia.com> | 2016-12-13 10:24:19 +0100 |
---|---|---|
committer | Iago Toral Quiroga <itoral@igalia.com> | 2016-12-13 10:33:14 +0100 |
commit | 77f65b3b643d135a5eab3799a600302177dccb26 (patch) | |
tree | 6f2822f693155fc336d49c176ca35f9a6052bc0a /src | |
parent | 5be2e785b1df2160424eb73e53cca340e0130020 (diff) |
i965/nir: enable lowering of texture gradient for shadow samplers
This gets the lowering on the Vulkan driver too, which is required for
hardware that does not have the sample_l_d message (up to IvyBridge).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_nir.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_nir.c b/src/mesa/drivers/dri/i965/brw_nir.c index f6bcd452656..55b16cf851b 100644 --- a/src/mesa/drivers/dri/i965/brw_nir.c +++ b/src/mesa/drivers/dri/i965/brw_nir.c @@ -596,6 +596,9 @@ brw_nir_apply_sampler_key(nir_shader *nir, tex_options.swizzles[s][c] = GET_SWZ(key_tex->swizzles[s], c); } + /* Prior to Haswell, we have to lower gradients on shadow samplers */ + tex_options.lower_txd_shadow = devinfo->gen < 8 && !devinfo->is_haswell; + tex_options.lower_y_uv_external = key_tex->y_uv_image_mask; tex_options.lower_y_u_v_external = key_tex->y_u_v_image_mask; tex_options.lower_yx_xuxv_external = key_tex->yx_xuxv_image_mask; |