diff options
author | Marek Olšák <[email protected]> | 2015-07-05 16:10:54 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-07-22 23:56:00 +0200 |
commit | 4e8bbed926729fe280701412d85aff64ab79856c (patch) | |
tree | a95222f13f7ea0eba01987a03198cd89cd5c9b5f /src/gallium/auxiliary/cso_cache | |
parent | 3639d66a473591e21aa2ec7692c95c827b479632 (diff) |
cso: drop inefficient checking for redundant sampler state changes
Drivers can do this better, because they can skip redundant state changes
at per-slot granularity.
Diffstat (limited to 'src/gallium/auxiliary/cso_cache')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_context.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 1705175d660..969a9a41650 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -56,11 +56,6 @@ */ struct sampler_info { - struct { - void *samplers[PIPE_MAX_SAMPLERS]; - unsigned nr_samplers; - } hw; - void *samplers[PIPE_MAX_SAMPLERS]; unsigned nr_samplers; @@ -1187,27 +1182,8 @@ single_sampler_done(struct cso_context *ctx, unsigned shader_stage) } info->nr_samplers = i; - - if (info->hw.nr_samplers != info->nr_samplers || - memcmp(info->hw.samplers, - info->samplers, - info->nr_samplers * sizeof(void *)) != 0) - { - memcpy(info->hw.samplers, - info->samplers, - info->nr_samplers * sizeof(void *)); - - /* set remaining slots/pointers to null */ - for (i = info->nr_samplers; i < info->hw.nr_samplers; i++) - info->samplers[i] = NULL; - - ctx->pipe->bind_sampler_states(ctx->pipe, shader_stage, 0, - MAX2(info->nr_samplers, - info->hw.nr_samplers), - info->samplers); - - info->hw.nr_samplers = info->nr_samplers; - } + ctx->pipe->bind_sampler_states(ctx->pipe, shader_stage, 0, i, + info->samplers); } void |