mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
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 <robclark@freedesktop.org>
This commit is contained in:
parent
fadfaa82c6
commit
d4ff42bd0a
1 changed files with 27 additions and 40 deletions
|
|
@ -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,
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
|
fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
|
||||||
unsigned start, unsigned nr,
|
unsigned start, unsigned nr,
|
||||||
struct pipe_sampler_view **views)
|
struct pipe_sampler_view **views)
|
||||||
{
|
{
|
||||||
assert(start == 0);
|
struct fd_context *ctx = fd_context(pctx);
|
||||||
switch (shader) {
|
|
||||||
case PIPE_SHADER_FRAGMENT:
|
assert(start == 0);
|
||||||
fd_fragtex_set_sampler_views(pctx, nr, views);
|
|
||||||
break;
|
switch (shader) {
|
||||||
case PIPE_SHADER_VERTEX:
|
case PIPE_SHADER_FRAGMENT:
|
||||||
fd_verttex_set_sampler_views(pctx, nr, views);
|
/* on a2xx, since there is a flat address space for textures/samplers,
|
||||||
break;
|
* a change in # of fragment textures/samplers will trigger patching
|
||||||
default:
|
* 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;
|
||||||
|
|
||||||
|
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
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue