virgl: drop precise modifier.
authorDave Airlie <airlied@redhat.com>
Fri, 28 Jul 2017 01:04:35 +0000 (11:04 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 28 Jul 2017 01:04:35 +0000 (11:04 +1000)
The host doesn't understand this yet, so drop it for now.

Fixes: virgl regressions.
Fixes: af22adee4f (tgsi: add precise flag to tgsi_instruction)
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/virgl/virgl_tgsi.c

index 4a2271f24f4f4da5f0872300eb4c435c3ec0e609..7ad1cbdb886b56111f304d74618344c3d02c41fc 100644 (file)
@@ -48,6 +48,15 @@ virgl_tgsi_transform_property(struct tgsi_transform_context *ctx,
    }
 }
 
+static void
+virgl_tgsi_transform_instruction(struct tgsi_transform_context *ctx,
+                                struct tgsi_full_instruction *inst)
+{
+   if (inst->Instruction.Precise)
+      inst->Instruction.Precise = 0;
+   ctx->emit_instruction(ctx, inst);
+}
+
 struct tgsi_token *virgl_tgsi_transform(const struct tgsi_token *tokens_in)
 {
 
@@ -61,6 +70,7 @@ struct tgsi_token *virgl_tgsi_transform(const struct tgsi_token *tokens_in)
 
    memset(&transform, 0, sizeof(transform));
    transform.base.transform_property = virgl_tgsi_transform_property;
+   transform.base.transform_instruction = virgl_tgsi_transform_instruction;
    tgsi_transform_shader(tokens_in, new_tokens, newLen, &transform.base);
 
    return new_tokens;