summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-05-16 10:58:48 -0700
committerRob Clark <[email protected]>2019-05-20 09:10:12 -0700
commit54d94f5780b582a16ebac2c8122c63e918c2a69b (patch)
treefb9fa74ac2e3679f32f14ecfd4df830dfd7fd8ca /src/gallium
parentdaa85a882e890b9c8361e3c386282b9255124c75 (diff)
freedreno/a6xx: don't evaluate FS tex state in binning pass
It is unneeded since FS doesn't run in binning pass. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_emit.c17
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_emit.h3
2 files changed, 14 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
index dfa0944cedb..23449ee8923 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
@@ -566,12 +566,15 @@ fd6_emit_combined_textures(struct fd_ringbuffer *ring, struct fd6_emit *emit,
struct fd_context *ctx = emit->ctx;
bool needs_border = false;
- static const enum fd6_state_id state_id[PIPE_SHADER_TYPES] = {
- [PIPE_SHADER_VERTEX] = FD6_GROUP_VS_TEX,
- [PIPE_SHADER_FRAGMENT] = FD6_GROUP_FS_TEX,
+ static const struct {
+ enum fd6_state_id state_id;
+ unsigned enable_mask;
+ } s[PIPE_SHADER_TYPES] = {
+ [PIPE_SHADER_VERTEX] = { FD6_GROUP_VS_TEX, 0x7 },
+ [PIPE_SHADER_FRAGMENT] = { FD6_GROUP_FS_TEX, 0x6 },
};
- debug_assert(state_id[type]);
+ debug_assert(s[type].state_id);
if (!v->image_mapping.num_tex && !v->fb_read) {
/* in the fast-path, when we don't have to mix in any image/SSBO
@@ -595,7 +598,8 @@ fd6_emit_combined_textures(struct fd_ringbuffer *ring, struct fd6_emit *emit,
needs_border |= tex->needs_border;
- fd6_emit_add_group(emit, tex->stateobj, state_id[type], 0x7);
+ fd6_emit_add_group(emit, tex->stateobj, s[type].state_id,
+ s[type].enable_mask);
}
} else {
/* In the slow-path, create a one-shot texture state object
@@ -615,7 +619,8 @@ fd6_emit_combined_textures(struct fd_ringbuffer *ring, struct fd6_emit *emit,
needs_border |= fd6_emit_textures(ctx->pipe, stateobj, type, tex,
bcolor_offset, v, ctx);
- fd6_emit_add_group(emit, stateobj, state_id[type], 0x7);
+ fd6_emit_add_group(emit, stateobj, s[type].state_id,
+ s[type].enable_mask);
fd_ringbuffer_del(stateobj);
}
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
index 1780ae0bda9..5c86b992740 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.h
@@ -61,6 +61,9 @@ enum fd6_state_id {
struct fd6_state_group {
struct fd_ringbuffer *stateobj;
enum fd6_state_id group_id;
+ /* enable_mask controls which states the stateobj is evaluated in,
+ * b0 is binning pass b1 and/or b2 is draw pass
+ */
uint8_t enable_mask;
};