diff options
author | Rob Clark <[email protected]> | 2016-04-19 15:52:18 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-04-19 16:11:47 -0400 |
commit | d4ff42bd0a80acfac080507e4e14f33f0b3bffbb (patch) | |
tree | d733014dc335273a1ae5ba381825e1b3ec683bea | |
parent | fadfaa82c61a32c74531e1e1aaecfd2b3c5ac6d8 (diff) |
freedreno: cleanup fd_set_sampler_views
The separate FS/VS entrypoints are no longer used since a3ed98f. So
just inline them.
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_texture.c | 61 |
1 files changed, 24 insertions, 37 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index f5611abaec8..a301811995d 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.c +++ b/src/gallium/drivers/freedreno/freedreno_texture.c @@ -110,49 +110,36 @@ fd_sampler_states_bind(struct pipe_context *pctx, } } - -static void -fd_fragtex_set_sampler_views(struct pipe_context *pctx, unsigned nr, +void +fd_set_sampler_views(struct pipe_context *pctx, unsigned shader, + unsigned start, unsigned nr, struct pipe_sampler_view **views) { struct fd_context *ctx = fd_context(pctx); - /* on a2xx, since there is a flat address space for textures/samplers, - * a change in # of fragment textures/samplers will trigger patching and - * re-emitting the vertex shader: - */ - if (nr != ctx->fragtex.num_textures) - ctx->dirty |= FD_DIRTY_TEXSTATE; - - set_sampler_views(&ctx->fragtex, nr, views); - ctx->dirty |= FD_DIRTY_FRAGTEX; -} + assert(start == 0); -static void -fd_verttex_set_sampler_views(struct pipe_context *pctx, unsigned nr, - struct pipe_sampler_view **views) -{ - struct fd_context *ctx = fd_context(pctx); - set_sampler_views(&ctx->verttex, nr, views); - ctx->dirty |= FD_DIRTY_VERTTEX; -} + switch (shader) { + case PIPE_SHADER_FRAGMENT: + /* on a2xx, since there is a flat address space for textures/samplers, + * a change in # of fragment textures/samplers will trigger patching + * and re-emitting the vertex shader: + * + * (note: later gen's ignore FD_DIRTY_TEXSTATE so fine to set it) + */ + if (nr != ctx->fragtex.num_textures) + ctx->dirty |= FD_DIRTY_TEXSTATE; -void -fd_set_sampler_views(struct pipe_context *pctx, unsigned shader, - unsigned start, unsigned nr, - struct pipe_sampler_view **views) -{ - assert(start == 0); - switch (shader) { - case PIPE_SHADER_FRAGMENT: - fd_fragtex_set_sampler_views(pctx, nr, views); - break; - case PIPE_SHADER_VERTEX: - fd_verttex_set_sampler_views(pctx, nr, views); - break; - default: - ; - } + set_sampler_views(&ctx->fragtex, nr, views); + ctx->dirty |= FD_DIRTY_FRAGTEX; + break; + case PIPE_SHADER_VERTEX: + set_sampler_views(&ctx->verttex, nr, views); + ctx->dirty |= FD_DIRTY_VERTTEX; + break; + default: + break; + } } void |