broadcom/vc5: Update the compiler for V3D 4.2.
authorEric Anholt <eric@anholt.net>
Sat, 27 Jan 2018 07:34:35 +0000 (18:34 +1100)
committerEric Anholt <eric@anholt.net>
Sat, 27 Jan 2018 08:04:21 +0000 (19:04 +1100)
src/broadcom/compiler/nir_to_vir.c

index 68e86f3a1c2e8f12fabf1996a7b3e658a29f7d42..46f3c9bc41928f23cba4c5af89e6f808f747bc6d 100644 (file)
@@ -969,7 +969,11 @@ emit_frag_end(struct v3d_compile *c)
                 switch (glsl_get_base_type(var->type)) {
                 case GLSL_TYPE_UINT:
                 case GLSL_TYPE_INT:
-                        conf |= TLB_TYPE_I32_COLOR;
+                        /* The F32 vs I32 distinction was dropped in 4.2. */
+                        if (c->devinfo->ver < 42)
+                                conf |= TLB_TYPE_I32_COLOR;
+                        else
+                                conf |= TLB_TYPE_F32_COLOR;
                         conf |= ((num_components - 1) <<
                                  TLB_VEC_SIZE_MINUS_1_SHIFT);
 
@@ -1159,7 +1163,7 @@ emit_vert_end(struct v3d_compile *c)
 
         /* GFXH-1684: VPM writes need to be complete by the end of the shader.
          */
-        if (c->devinfo->ver >= 40 && c->devinfo->ver <= 41)
+        if (c->devinfo->ver >= 40 && c->devinfo->ver <= 42)
                 vir_VPMWT(c);
 }