i965/vec4: fix size_written for doubles
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 30 May 2016 11:31:25 +0000 (13:31 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 3 Jan 2017 10:26:51 +0000 (11:26 +0100)
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index e88bb7c7e4b14bbe4e947b3d78e579be9de9ab1a..0bf423cf654b321b8bdb81700c2c6793c6a21684 100644 (file)
@@ -46,7 +46,6 @@ vec4_instruction::vec4_instruction(enum opcode opcode, const dst_reg &dst,
    this->predicate = BRW_PREDICATE_NONE;
    this->predicate_inverse = false;
    this->target = 0;
-   this->size_written = (dst.file == BAD_FILE ? 0 : REG_SIZE);
    this->shadow_compare = false;
    this->ir = NULL;
    this->urb_write_flags = BRW_URB_WRITE_NO_FLAGS;
@@ -56,6 +55,8 @@ vec4_instruction::vec4_instruction(enum opcode opcode, const dst_reg &dst,
    this->base_mrf = 0;
    this->offset = 0;
    this->exec_size = 8;
+   this->size_written = (dst.file == BAD_FILE ?
+                         0 : this->exec_size * type_sz(dst.type));
    this->annotation = NULL;
 }