glsl: simplify link_uniform_blocks()
There is only ever one shader so simplify the input params. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
@@ -391,8 +391,7 @@ void
|
|||||||
link_uniform_blocks(void *mem_ctx,
|
link_uniform_blocks(void *mem_ctx,
|
||||||
struct gl_context *ctx,
|
struct gl_context *ctx,
|
||||||
struct gl_shader_program *prog,
|
struct gl_shader_program *prog,
|
||||||
struct gl_linked_shader **shader_list,
|
struct gl_linked_shader *shader,
|
||||||
unsigned num_shaders,
|
|
||||||
struct gl_uniform_block **ubo_blocks,
|
struct gl_uniform_block **ubo_blocks,
|
||||||
unsigned *num_ubo_blocks,
|
unsigned *num_ubo_blocks,
|
||||||
struct gl_uniform_block **ssbo_blocks,
|
struct gl_uniform_block **ssbo_blocks,
|
||||||
@@ -415,9 +414,7 @@ link_uniform_blocks(void *mem_ctx,
|
|||||||
/* Determine which uniform blocks are active.
|
/* Determine which uniform blocks are active.
|
||||||
*/
|
*/
|
||||||
link_uniform_block_active_visitor v(mem_ctx, block_hash, prog);
|
link_uniform_block_active_visitor v(mem_ctx, block_hash, prog);
|
||||||
for (unsigned i = 0; i < num_shaders; i++) {
|
visit_list_elements(&v, shader->ir);
|
||||||
visit_list_elements(&v, shader_list[i]->ir);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Count the number of active uniform blocks. Count the total number of
|
/* Count the number of active uniform blocks. Count the total number of
|
||||||
* active slots in those uniform blocks.
|
* active slots in those uniform blocks.
|
||||||
|
@@ -2312,9 +2312,8 @@ link_intrastage_shaders(void *mem_ctx,
|
|||||||
v.fixup_unnamed_interface_types();
|
v.fixup_unnamed_interface_types();
|
||||||
|
|
||||||
/* Link up uniform blocks defined within this stage. */
|
/* Link up uniform blocks defined within this stage. */
|
||||||
link_uniform_blocks(mem_ctx, ctx, prog, &linked, 1,
|
link_uniform_blocks(mem_ctx, ctx, prog, linked, &ubo_blocks,
|
||||||
&ubo_blocks, &num_ubo_blocks, &ssbo_blocks,
|
&num_ubo_blocks, &ssbo_blocks, &num_ssbo_blocks);
|
||||||
&num_ssbo_blocks);
|
|
||||||
|
|
||||||
if (!prog->LinkStatus) {
|
if (!prog->LinkStatus) {
|
||||||
_mesa_delete_linked_shader(ctx, linked);
|
_mesa_delete_linked_shader(ctx, linked);
|
||||||
|
@@ -57,8 +57,7 @@ extern void
|
|||||||
link_uniform_blocks(void *mem_ctx,
|
link_uniform_blocks(void *mem_ctx,
|
||||||
struct gl_context *ctx,
|
struct gl_context *ctx,
|
||||||
struct gl_shader_program *prog,
|
struct gl_shader_program *prog,
|
||||||
struct gl_linked_shader **shader_list,
|
struct gl_linked_shader *shader,
|
||||||
unsigned num_shaders,
|
|
||||||
struct gl_uniform_block **ubo_blocks,
|
struct gl_uniform_block **ubo_blocks,
|
||||||
unsigned *num_ubo_blocks,
|
unsigned *num_ubo_blocks,
|
||||||
struct gl_uniform_block **ssbo_blocks,
|
struct gl_uniform_block **ssbo_blocks,
|
||||||
|
Reference in New Issue
Block a user