i965: Teach type_size() about the size of an image uniform.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 5 May 2015 18:05:45 +0000 (21:05 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 11 Aug 2015 12:07:40 +0000 (15:07 +0300)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index 6fe900aa63f23a52bebbd2470ff436c338513a89..82cb499a3266382e559874254d41dde2371d54b3 100644 (file)
@@ -484,6 +484,7 @@ fs_visitor::type_size(const struct glsl_type *type)
    case GLSL_TYPE_SUBROUTINE:
       return 1;
    case GLSL_TYPE_IMAGE:
+      return BRW_IMAGE_PARAM_SIZE;
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_ERROR:
    case GLSL_TYPE_INTERFACE:
index 34dd71596313f50b8fc08c57d60395ccd3b0c40f..9062bcc444f30a52418daea707b8aa7ab1fbbe79 100644 (file)
@@ -638,6 +638,7 @@ vec4_visitor::type_size(const struct glsl_type *type)
    case GLSL_TYPE_ATOMIC_UINT:
       return 0;
    case GLSL_TYPE_IMAGE:
+      return DIV_ROUND_UP(BRW_IMAGE_PARAM_SIZE, 4);
    case GLSL_TYPE_VOID:
    case GLSL_TYPE_DOUBLE:
    case GLSL_TYPE_ERROR: