[Mesa-dev] [PATCH] i965/fs: Split VGRFs after lowering pull constants
Jason Ekstrand
jason at jlekstrand.net
Wed Aug 19 14:34:16 PDT 2015
The following shader test exercises the bug:
[require]
GLSL >= 1.10
[vertex shader]
void main()
{
gl_Position = gl_Vertex;
}
[fragment shader]
uniform float f[4];
uniform ivec4 s;
void main()
{
gl_FragColor = vec4(f[s.x], f[s.y], f[s.z], f[s.w]);
}
[test]
uniform float f[0] 0.0
uniform float f[1] 1.0
uniform ivec4 s 0 1 0 1
draw rect -1 -1 2 2
On Wed, Aug 19, 2015 at 2:32 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> The split_virtual_grfs code doesn't properly rewrite reladdr so we need to
> make sure that any uniform indirects are lowered away first.
> ---
> src/mesa/drivers/dri/i965/brw_fs.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index 2a4cbff..3d55dc8 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -4784,11 +4784,11 @@ fs_visitor::optimize()
> */
> bld = fs_builder(this, 64);
>
> - split_virtual_grfs();
> -
> assign_constant_locations();
> lower_constant_loads();
>
> + split_virtual_grfs();
> +
> #define OPT(pass, args...) ({ \
> pass_num++; \
> bool this_progress = pass(args); \
> --
> 2.4.3
>
More information about the mesa-dev
mailing list