From: Chia-I Wu Date: Fri, 16 Oct 2015 14:53:05 +0000 (+0800) Subject: ilo: set VME for 3DSTATE_PS X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86ccb2a16f6d21be29cd99d38831eab6079ce107;p=mesa.git ilo: set VME for 3DSTATE_PS When the bit is not set, we can see sampling artifacts on triangle edges when the mip filter is not GEN6_MIPFILTER_NONE. --- diff --git a/src/gallium/drivers/ilo/core/ilo_state_shader_ps.c b/src/gallium/drivers/ilo/core/ilo_state_shader_ps.c index f4d801e9b56..ceeb68a460e 100644 --- a/src/gallium/drivers/ilo/core/ilo_state_shader_ps.c +++ b/src/gallium/drivers/ilo/core/ilo_state_shader_ps.c @@ -592,7 +592,12 @@ ps_set_gen8_3DSTATE_PS(struct ilo_state_ps *ps, ILO_DEV_ASSERT(dev, 8, 8); - dw3 = ff->sampler_count << GEN6_THREADDISP_SAMPLER_COUNT__SHIFT | + /* + * Set VME here for correct computation of LODs and others. Not sure why + * it is needed now. + */ + dw3 = GEN6_THREADDISP_VME | + ff->sampler_count << GEN6_THREADDISP_SAMPLER_COUNT__SHIFT | ff->surface_count << GEN6_THREADDISP_BINDING_TABLE_SIZE__SHIFT; if (false)