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/blorp/blorp.c | 2 +- src/intel/blorp/blorp_blit.c | 4 ++-- src/intel/blorp/blorp_clear.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/intel/blorp') diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c index 8f64f1af37c..1144e770b49 100644 --- a/src/intel/blorp/blorp.c +++ b/src/intel/blorp/blorp.c @@ -165,7 +165,7 @@ brw_blorp_init_wm_prog_key(struct brw_wm_prog_key *wm_key) memset(wm_key, 0, sizeof(*wm_key)); wm_key->nr_color_regions = 1; for (int i = 0; i < MAX_SAMPLERS; i++) - wm_key->tex.swizzles[i] = SWIZZLE_XYZW; + wm_key->base.tex.swizzles[i] = SWIZZLE_XYZW; } const unsigned * diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 3b8a5b49862..78a47c9cbe5 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -1496,9 +1496,9 @@ brw_blorp_get_blit_kernel(struct blorp_batch *batch, struct brw_wm_prog_key wm_key; brw_blorp_init_wm_prog_key(&wm_key); - wm_key.tex.compressed_multisample_layout_mask = + wm_key.base.tex.compressed_multisample_layout_mask = prog_key->tex_aux_usage == ISL_AUX_USAGE_MCS; - wm_key.tex.msaa_16 = prog_key->tex_samples == 16; + wm_key.base.tex.msaa_16 = prog_key->tex_samples == 16; wm_key.multisample_fbo = prog_key->rt_samples > 1; program = blorp_compile_fs(blorp, mem_ctx, nir, &wm_key, false, diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index 00447aa9690..7e77e80565f 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -1002,8 +1002,8 @@ blorp_params_get_mcs_partial_resolve_kernel(struct blorp_batch *batch, struct brw_wm_prog_key wm_key; brw_blorp_init_wm_prog_key(&wm_key); - wm_key.tex.compressed_multisample_layout_mask = 1; - wm_key.tex.msaa_16 = blorp_key.num_samples == 16; + wm_key.base.tex.compressed_multisample_layout_mask = 1; + wm_key.base.tex.msaa_16 = blorp_key.num_samples == 16; wm_key.multisample_fbo = true; struct brw_wm_prog_data prog_data; -- cgit v1.2.3