[Mesa-dev] [PATCH] i965: expose BRW_OPCODE_[F32TO16/F16TO32] opcode_descs on gen8+

Ilia Mirkin imirkin at alum.mit.edu
Wed Mar 29 13:39:39 UTC 2017


I guess you want GEN_GE(GEN7), no?

On Mar 29, 2017 7:48 AM, "Alejandro PiƱeiro" <apinheiro at igalia.com> wrote:

> Technically those hw operations are only available on gen7, as gen8+
> support the conversion on the MOV. But, when using the builder to
> implement nir operations (example: nir_op_fquantize2f16), it is not
> needed to do the gen check. This check is done later, on the final
> emission at brw_F32TO16 (brw_eu_emit), choosing between the MOV or the
> specific operation accordingly.
>
> So in the middle, during optimization phases those hw operations can
> be around for gen8+ too.
>
> Without this patch, several (at least 95) vulkan-cts quantize tests
> crashes when using INTEL_DEBUG=optimizer. For example:
> dEQP-VK.spirv_assembly.instruction.graphics.opquantize.too_small_vert
> ---
>  src/intel/compiler/brw_eu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/compiler/brw_eu.c b/src/intel/compiler/brw_eu.c
> index 77400c1..bff37d7 100644
> --- a/src/intel/compiler/brw_eu.c
> +++ b/src/intel/compiler/brw_eu.c
> @@ -499,10 +499,10 @@ static const struct opcode_desc opcode_descs[128] = {
>        .name = "csel",    .nsrc = 3, .ndst = 1, .gens = GEN_GE(GEN8),
>     },
>     [BRW_OPCODE_F32TO16] = {
> -      .name = "f32to16", .nsrc = 1, .ndst = 1, .gens = GEN7 | GEN75,
> +      .name = "f32to16", .nsrc = 1, .ndst = 1, .gens = GEN7 | GEN75 |
> GEN8 | GEN9,
>     },
>     [BRW_OPCODE_F16TO32] = {
> -      .name = "f16to32", .nsrc = 1, .ndst = 1, .gens = GEN7 | GEN75,
> +      .name = "f16to32", .nsrc = 1, .ndst = 1, .gens = GEN7 | GEN75 |
> GEN8 | GEN9,
>     },
>     /* Reserved - 21-22 */
>     [BRW_OPCODE_BFREV] = {
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170329/5355dc5a/attachment-0001.html>


More information about the mesa-dev mailing list