[Mesa-dev] [PATCH] i965/vec4/nir: add nir_intrinsic_memory_barrier support

Samuel Iglesias Gonsálvez siglesias at igalia.com
Mon Sep 28 23:51:33 PDT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 28/09/15 17:48, Francisco Jerez wrote:
> Samuel Iglesias Gonsalvez <siglesias at igalia.com> writes:
> 
>> Fix OpenGL ES 3.1 conformance tests:
>> advanced-readWrite-case1-vsfs and advanced-matrix-vsfs.
>> 
>> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com> 
>> Tested-by: Tapani Pälli <tapani.palli at intel.com> Cc: Francisco
>> Jerez <currojerez at riseup.net> --- 
>> src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 9 +++++++++ 1 file
>> changed, 9 insertions(+)
>> 
>> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
>> b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index
>> 175d92b..5c418fb 100644 ---
>> a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++
>> b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -654,6 +654,15 @@
>> vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr) 
>> break; }
>> 
>> +   case nir_intrinsic_memory_barrier: { +      const
>> vec4_builder bld = +
>> vec4_builder(this).at_end().annotate(current_annotation,
>> base_ir); +      const src_reg tmp = src_reg(this,
>> glsl_type::uint_type);
> 
> The temporary register you pass to the MEMORY_FENCE instruction
> should be at least regs_written VGRFs, you could use 
> 'bld.vgrf(BRW_REGISTER_TYPE_UD, 2)' instead.
> 

OK

>> +      bld.emit(SHADER_OPCODE_MEMORY_FENCE, dest, tmp)
> 
> MEMORY_FENCE only takes a destination (which should be tmp rather
> than dest) and no source registers.
> 

OK.

Thanks,

Sam

>> +         ->regs_written = 2; +      break; +   } + default: 
>> unreachable("Unknown intrinsic"); } -- 2.1.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWCjT1AAoJEH/0ujLxfcNDrqMQALov9lvW//2nCmlpqLWy5RkI
mJPgoOlBKdYiPOYDflgpZm2GlfX2TtOV/QAileQcKjQnOt+rhL5fGgCipR3L1zDE
Ka1F2NxrUVi3tY/I/D4oK4NCMp3DdI7J1epV1fxKdl9F+9lW79kuW8Kc9Y+fFqcf
WyghqGn4UscLgPLCZUm0D7gVPW5yZ22vG0DmNQauQNdrx4fWKNolc/ZL1SR+Nbxp
3DcfP8+vOtL8a7/6lpCprZPIxMc1nsc4HajfIYVvPFWI1K26q03vtahIdQWq2knc
3Z6oE+92aMBWC9yMePS2ssyPvGt1/BcWWDpY0+03zci39uS4UgMyAec3WgdFoMJU
TrdWeae+qsNnuiz02U1UVuROqd7ucDusdJSfsWjwS1/tfdZbsXBoiuXY/uUkgSCB
E48ImjC+sSgDEszWxIfbWYRxUk6YlMxeywl8F+RTL/gE/+yhTz2uxGzbpMX6HxzH
efqAUe+vLk6HvfBgYfQOGZujZbh1xMUJB+wIRAf2x6yuKVC2fWXDFIzBIZkkeayw
Wz95sUYZF+5CS6F31lwitA4C5koCEx9hwToTTiyPiiLgl0Xq/OHgVTQHLjtjJ1Jq
dLaXsGyYUjhFoDOBNGoBXIdGRt1NfB3iPEWpqyn1175Okdq6wUtXmVSkY5bu6kdr
cxkqYDzWLMwl2L9JFIUJ
=x/5U
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list