(unsigned)(ptrdiff_t)(&variables[parcel.index] - blocks[i].Uniforms);
blocks[i].Set = b->set;
- blocks[i].Index = b->index;
+ blocks[i].Binding = b->binding;
i++;
}
(unsigned)(ptrdiff_t)(&variables[parcel.index] - blocks[i].Uniforms);
blocks[i].Set = b->set;
- blocks[i].Index = b->index;
+ blocks[i].Binding = b->binding;
i++;
}
fs_reg surf_index;
if (const_index) {
- surf_index = fs_reg(stage_prog_data->binding_table.ubo_start +
- const_index->u[0]);
+ uint32_t index = const_index->u[0];
+ uint32_t set = shader->base.UniformBlocks[index].Set;
+ uint32_t binding = shader->base.UniformBlocks[index].Binding;
+
+ surf_index = fs_reg(stage_prog_data->bind_map[set][binding]);
} else {
+ assert(0 && "need more info from the ir for this.");
/* The block index is not a constant. Evaluate the index expression
* per-channel and add the base UBO index; we have to select a value
* from any live channel.
*/
index = const_uniform_block->value.u[0];
set = shader->base.UniformBlocks[index].Set;
- set_index = shader->base.UniformBlocks[index].Index;
+ set_index = shader->base.UniformBlocks[index].Binding;
binding = stage_prog_data->bind_map[set][set_index];
surf_index = fs_reg(binding);
} else {
GLuint Binding;
/**
- * Vulkan descriptor set and index qualifiers for this block.
+ * Vulkan descriptor set qualifier for this block.
*/
GLuint Set;
- GLuint Index;
/**
* Minimum size (in bytes) of a buffer object to back this uniform buffer