From 14781e21227d036b8875bbdde9f343a8e73ceeb6 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 21 Feb 2019 17:20:39 -0600 Subject: intel/compiler: Add a "base class" for program keys Right now, all keys have two things in common: a program string ID and a sampler_prog_key_data. I'd like to add another thing or two and need a place to put it. This commit adds a new brw_base_prog_key struct which contains those two common bits. Reviewed-by: Kenneth Graunke --- src/intel/compiler/brw_vec4_tcs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/intel/compiler/brw_vec4_tcs.cpp') diff --git a/src/intel/compiler/brw_vec4_tcs.cpp b/src/intel/compiler/brw_vec4_tcs.cpp index 39df2d5054b..b8f2a3bde0a 100644 --- a/src/intel/compiler/brw_vec4_tcs.cpp +++ b/src/intel/compiler/brw_vec4_tcs.cpp @@ -42,7 +42,7 @@ vec4_tcs_visitor::vec4_tcs_visitor(const struct brw_compiler *compiler, void *mem_ctx, int shader_time_index, const struct brw_vue_map *input_vue_map) - : vec4_visitor(compiler, log_data, &key->tex, &prog_data->base, + : vec4_visitor(compiler, log_data, &key->base.tex, &prog_data->base, nir, mem_ctx, false, shader_time_index), input_vue_map(input_vue_map), key(key) { @@ -397,7 +397,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, nir->info.outputs_written, nir->info.patch_outputs_written); - brw_nir_apply_sampler_key(nir, compiler, &key->tex, is_scalar); + brw_nir_apply_sampler_key(nir, compiler, &key->base.tex, is_scalar); brw_nir_lower_vue_inputs(nir, &input_vue_map); brw_nir_lower_tcs_outputs(nir, &vue_prog_data->vue_map, key->tes_primitive_mode); @@ -475,7 +475,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, } if (is_scalar) { - fs_visitor v(compiler, log_data, mem_ctx, (void *) key, + fs_visitor v(compiler, log_data, mem_ctx, &key->base, &prog_data->base.base, NULL, nir, 8, shader_time_index, &input_vue_map); if (!v.run_tcs()) { -- cgit v1.2.3