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 <kenneth@whitecape.org>
This commit is contained in:
committed by
Jason Ekstrand
parent
3a4667e502
commit
14781e2122
@@ -2845,7 +2845,7 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data,
|
||||
char **error_str)
|
||||
{
|
||||
const bool is_scalar = compiler->scalar_stage[MESA_SHADER_VERTEX];
|
||||
brw_nir_apply_sampler_key(shader, compiler, &key->tex, is_scalar);
|
||||
brw_nir_apply_sampler_key(shader, compiler, &key->base.tex, is_scalar);
|
||||
|
||||
const unsigned *assembly = NULL;
|
||||
|
||||
@@ -2961,7 +2961,8 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data,
|
||||
if (is_scalar) {
|
||||
prog_data->base.dispatch_mode = DISPATCH_MODE_SIMD8;
|
||||
|
||||
fs_visitor v(compiler, log_data, mem_ctx, key, &prog_data->base.base,
|
||||
fs_visitor v(compiler, log_data, mem_ctx, &key->base,
|
||||
&prog_data->base.base,
|
||||
NULL, /* prog; Only used for TEXTURE_RECTANGLE on gen < 8 */
|
||||
shader, 8, shader_time_index);
|
||||
if (!v.run_vs()) {
|
||||
|
||||
Reference in New Issue
Block a user