From bf7b6fd3fd6d98305d64ee6224ca9f9e7ba48444 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 1 Oct 2015 15:21:57 -0700 Subject: i965/shader: Get rid of the shader, prog, and shader_prog fields Unfortunately, we can't get rid of them entirely. The FS backend still needs gl_program for handling TEXTURE_RECTANGLE. The GS vec4 backend still needs gl_shader_program for handling transfom feedback. However, the VS needs neither and we can substantially reduce the amount they are used. One day we will be free from their tyranny. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp') diff --git a/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp b/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp index 1caa0b50ec6..f77b18e7db8 100644 --- a/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp +++ b/src/mesa/drivers/dri/i965/test_fs_saturate_propagation.cpp @@ -46,10 +46,10 @@ class saturate_propagation_fs_visitor : public fs_visitor public: saturate_propagation_fs_visitor(struct brw_compiler *compiler, struct brw_wm_prog_data *prog_data, - struct gl_shader_program *shader_prog) - : fs_visitor(compiler, NULL, NULL, MESA_SHADER_FRAGMENT, NULL, - &prog_data->base, shader_prog, - (struct gl_program *) NULL, 8, -1) {} + nir_shader *shader) + : fs_visitor(compiler, NULL, NULL, NULL, + &prog_data->base, (struct gl_program *) NULL, + shader, 8, -1) {} }; @@ -62,9 +62,9 @@ void saturate_propagation_test::SetUp() fp = ralloc(NULL, struct brw_fragment_program); prog_data = ralloc(NULL, struct brw_wm_prog_data); - shader_prog = ralloc(NULL, struct gl_shader_program); + nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_FRAGMENT, NULL); - v = new saturate_propagation_fs_visitor(compiler, prog_data, shader_prog); + v = new saturate_propagation_fs_visitor(compiler, prog_data, shader); _mesa_init_fragment_program(ctx, &fp->program, GL_FRAGMENT_SHADER, 0); -- cgit v1.2.3