}
var->data.index = ir->data.index;
+ var->data.descriptor_set = ir->data.set;
var->data.binding = ir->data.binding;
/* XXX Get rid of buffer_index */
var->data.atomic.buffer_index = ir->data.binding;
*
* For array types, this represents the binding point for the first element.
*/
+ int descriptor_set;
int binding;
/**
/* gather component selector */
unsigned component : 2;
+ /* The descriptor set containing this texture */
+ unsigned sampler_set;
+
/** The sampler index
*
* If this texture instruction has a nir_tex_src_sampler_offset source,
void
fs_visitor::nir_emit_texture(nir_tex_instr *instr)
{
- unsigned sampler = instr->sampler_index;
+ uint32_t set = instr->sampler_set;
+ uint32_t index = instr->sampler_index;
+ unsigned sampler = stage_prog_data->bind_map[set][index];
fs_reg sampler_reg(sampler);
/* FINISHME: We're failing to recompile our programs when the sampler is
nir_validate_shader(nir);
if (shader_prog) {
- nir_lower_samplers(nir, shader_prog, stage);
+ nir_lower_samplers_for_vk(nir);
nir_validate_shader(nir);
}
else
bias = 0;
- prog_data->binding_table.texture_start = bias;
-
count = layout->stage[stage].surface_count;
prog_data->map_entries =
(uint32_t *) malloc(count * sizeof(prog_data->map_entries[0]));