On 10/19/2011 01:53 PM, Paul Berry wrote:
On 18 October 2011 18:07, Brian Paul <[email protected] <mailto:[email protected]>> wrote:From: Brian Paul <[email protected] <mailto:[email protected]>> --- .../drivers/dri/i965/brw_vec4_reg_allocate.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp index 1ace91f..6de7682 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp @@ -217,7 +217,7 @@ vec4_visitor::reg_allocate() int reg = ra_get_node_reg(g, i); hw_reg_mapping[i] = first_assigned_grf + brw->vs.ra_reg_to_grf[reg]; - prog_data->total_grf = MAX2(prog_data->total_grf, + prog_data->total_grf = MAX2((int) prog_data->total_grf, hw_reg_mapping[i] + virtual_grf_sizes[i]); Since we're storing the result into an unsigned value, I'd prefer to fix the warning by converting the second argument of MAX2 to GLuint rather than converting the first argument of MAX2 to int.
I was wondering which way that should go. The types in that expression are:
GLuint total_grf; int hw_reg_mapping[]; can hw_reg_mapping[] values be negative? -Brian _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
