Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-09-04 Thread Dominik Behr
Updated patch. Previous one would reference NULL pointer if the list of formal parameters was empty. -- Dominik On Wed, Sep 4, 2013 at 2:40 PM, Dominik Behr wrote: > Fixes a bug where if an uniform array is passed to a function the accesses > to the array are not propagated so later all but th

Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-09-04 Thread Dominik Behr
Updated patch. Previous one would reference NULL pointer if the list of formal parameters was empty. On Wed, Sep 4, 2013 at 2:40 PM, Dominik Behr wrote: > Fixes a bug where if an uniform array is passed to a function the accesses > to the array are not propagated so later all but the first vect

[Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-09-04 Thread Dominik Behr
Fixes a bug where if an uniform array is passed to a function the accesses to the array are not propagated so later all but the first vector of the uniform array are removed in parcel_out_uniform_storage resulting in broken shaders and out of bounds access to arrays in brw::vec4_visitor::pack_unifo

Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-09-03 Thread Dominik Behr
Thanks, I looked at piglit tests and they look OK if they are only supposed to test whether the shader compiles and links. It doesn't look like they test the results of rendering which could be more useful? On Tue, Sep 3, 2013 at 3:19 PM, Dominik Behr wrote: > Thanks, > I looked at piglit tests

Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-09-03 Thread Matt Turner
On Wed, Aug 28, 2013 at 1:10 PM, Dominik Behr wrote: > Fixes a bug where if an uniform array is passed to a function the accesses > to the array are not propagated so later all but the first vector of the > uniform array are removed in parcel_out_uniform_storage resulting in > broken shaders and o

[Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-08-28 Thread Dominik Behr
Fixes a bug where if an uniform array is passed to a function the accesses to the array are not propagated so later all but the first vector of the uniform array are removed in parcel_out_uniform_storage resulting in broken shaders and out of bounds access to arrays in brw::vec4_visitor::pack_unifo

Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-08-28 Thread Dominik Behr
Ah it is by design. Sentinels are special nodes with no payload. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-08-27 Thread Dominik Behr
Hi, I am looking at the code in lower_clip_distance.cpp ir_visitor_status lower_clip_distance_visitor::visit_leave(ir_call *ir) { void *ctx = ralloc_parent(ir); const exec_node *formal_param_node = ir->callee->parameters.head; const exec_node *actual_param_node = ir->actual_parameters.he

Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-08-27 Thread Matt Turner
On Tue, Aug 27, 2013 at 2:03 PM, Dominik Behr wrote: > I am not sure about MAX2, is it guaranteed to be converted to branchless > conditional assignment? I don't think there's a guarantee, no. Using MAX2 just makes the code easier to immediately understand. ___

Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-08-27 Thread Dominik Behr
Hi, There was a lot of code everywhere that used iterators so it is not obvious for a new person that the iterators are evil. And they do abstract the implementation of the storage. Also, I'd rather use ir_instruction and as_*() calls instead of exec_node and explicit cast. I am not sure about MAX2

Re: [Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-08-27 Thread Ian Romanick
On 08/21/2013 05:57 PM, Dominik Behr wrote: Fixes a bug where if an uniform array is passed to a function the accesses to the array are not propagated so later all but the first vector of the uniform array are removed in parcel_out_uniform_storage resulting in broken shaders and out of bounds acc

[Mesa-dev] [PATCH] glsl: propagate max_array_access through function calls

2013-08-21 Thread Dominik Behr
Fixes a bug where if an uniform array is passed to a function the accesses to the array are not propagated so later all but the first vector of the uniform array are removed in parcel_out_uniform_storage resulting in broken shaders and out of bounds access to arrays in brw::vec4_visitor::pack_unifo