i965/fs: Return more accurate read size from fs_inst::size_read for IMM and UNIFORM...
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 2 Sep 2016 23:23:44 +0000 (16:23 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 14 Sep 2016 21:50:54 +0000 (14:50 -0700)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 8f1cd61d3b6beb212baced9742bb3e1d276c98de..e18aa72bd2c62180c9a2c2299d2ff563623ee2d1 100644 (file)
@@ -900,7 +900,7 @@ fs_inst::size_read(int arg) const
    switch (src[arg].file) {
    case UNIFORM:
    case IMM:
-      return 4;
+      return components_read(arg) * type_sz(src[arg].type);
    case BAD_FILE:
    case ARF:
    case FIXED_GRF: