diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c index 37b8251c916..9307c3d163f 100644 --- a/src/intel/blorp/blorp.c +++ b/src/intel/blorp/blorp.c @@ -226,12 +226,6 @@ blorp_compile_fs(struct blorp_context *blorp, void *mem_ctx, wm_prog_data->base.nr_params = 0; wm_prog_data->base.param = NULL; - /* BLORP always uses the first two binding table entries: - * - Surface 0 is the render target (which always start from 0) - * - Surface 1 is the source texture - */ - wm_prog_data->base.binding_table.texture_start = BLORP_TEXTURE_BT_INDEX; - brw_preprocess_nir(compiler, nir, NULL); nir_remove_dead_variables(nir, nir_var_shader_in, NULL); nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); @@ -303,12 +297,6 @@ blorp_compile_cs(struct blorp_context *blorp, void *mem_ctx, memset(cs_prog_data, 0, sizeof(*cs_prog_data)); - /* BLORP always uses the first two binding table entries: - * - Surface 0 is the destination image (which always start from 0) - * - Surface 1 is the source texture - */ - cs_prog_data->base.binding_table.texture_start = BLORP_TEXTURE_BT_INDEX; - brw_preprocess_nir(compiler, nir, NULL); nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir)); diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c index 6d1d7fc5e51..ff6cad759b8 100644 --- a/src/intel/blorp/blorp_blit.c +++ b/src/intel/blorp/blorp_blit.c @@ -144,9 +144,8 @@ blorp_create_nir_tex_instr(nir_builder *b, struct brw_blorp_blit_vars *v, tex->is_array = false; tex->is_shadow = false; - /* Blorp only has one texture and it's bound at unit 0 */ - tex->texture_index = 0; - tex->sampler_index = 0; + tex->texture_index = BLORP_TEXTURE_BT_INDEX; + tex->sampler_index = BLORP_SAMPLER_INDEX; /* To properly handle 3-D and 2-D array textures, we pull the Z component * from an input. TODO: This is a bit magic; we should probably make this diff --git a/src/intel/blorp/blorp_priv.h b/src/intel/blorp/blorp_priv.h index b4c2bbcdead..a5e8347f6dc 100644 --- a/src/intel/blorp/blorp_priv.h +++ b/src/intel/blorp/blorp_priv.h @@ -45,6 +45,8 @@ enum { BLORP_NUM_BT_ENTRIES }; +#define BLORP_SAMPLER_INDEX 0 + struct brw_blorp_surface_info { bool enabled;