X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fsoftpipe%2Fsp_state_derived.c;h=0083e332785e4be9338821856e66f3bed7af9874;hb=d70f96fd674cfb5a1aeedce179c2cc02c38a9fad;hp=4ce9d95bc6e8f6d2ba75ce424484c64a8352c6cd;hpb=afa8707ba93a7d226a76319acda2a8dd89524db7;p=mesa.git diff --git a/src/gallium/drivers/softpipe/sp_state_derived.c b/src/gallium/drivers/softpipe/sp_state_derived.c index 4ce9d95bc6e..0083e332785 100644 --- a/src/gallium/drivers/softpipe/sp_state_derived.c +++ b/src/gallium/drivers/softpipe/sp_state_derived.c @@ -176,14 +176,14 @@ softpipe_compute_vertex_info(struct softpipe_context *softpipe) /* * Note that we'd actually want to skip position (as we won't use * the attribute in the fs) but can't. The reason is that we don't - * actually have a input/output map for setup (even though it looks + * actually have an input/output map for setup (even though it looks * like we do...). Could adjust for this though even without a map. */ } else { /* * Note that we'd actually want to skip position (as we won't use * the attribute in the fs) but can't. The reason is that we don't - * actually have a input/output map for setup (even though it looks + * actually have an input/output map for setup (even though it looks * like we do...). Could adjust for this though even without a map. */ draw_emit_vertex_attr(vinfo, EMIT_4F, vs_index); @@ -292,6 +292,12 @@ set_shader_sampler(struct softpipe_context *softpipe, } } +void +softpipe_update_compute_samplers(struct softpipe_context *softpipe) +{ + set_shader_sampler(softpipe, PIPE_SHADER_COMPUTE, softpipe->cs->max_sampler); +} + static void update_tgsi_samplers( struct softpipe_context *softpipe ) { @@ -307,7 +313,7 @@ update_tgsi_samplers( struct softpipe_context *softpipe ) } /* XXX is this really necessary here??? */ - for (sh = 0; sh < Elements(softpipe->tex_cache); sh++) { + for (sh = 0; sh < ARRAY_SIZE(softpipe->tex_cache); sh++) { for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { struct softpipe_tex_tile_cache *tc = softpipe->tex_cache[sh][i]; if (tc && tc->texture) {