st/mesa: set dimension for constants in ATI_fragment_shader
authorMiklós Máté <mtmkls@gmail.com>
Sun, 15 Oct 2017 17:46:03 +0000 (19:46 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 18 Oct 2017 17:36:53 +0000 (19:36 +0200)
This fixes an assertion failure introduced by 30a2f0dfd46de.

Fixes: 30a2f0dfd46 ("radeonsi: add an assertion that only
Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_atifs_to_tgsi.c

index 2a171b5a847f40e9a5a7297396de353e5c5f6945..25ccf7073502cebb080f82835c055afbe42ce0bc 100644 (file)
@@ -637,6 +637,10 @@ set_src(struct tgsi_full_instruction *inst, unsigned i, unsigned file, unsigned
    inst->Src[i].Register.SwizzleY = y;
    inst->Src[i].Register.SwizzleZ = z;
    inst->Src[i].Register.SwizzleW = w;
+   if (file == TGSI_FILE_CONSTANT) {
+      inst->Src[i].Register.Dimension = 1;
+      inst->Src[i].Dimension.Index = 0;
+   }
 }
 
 #define SET_SRC(inst, i, file, index, x, y, z, w) \