summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-05-02 15:42:10 -0700
committerKenneth Graunke <[email protected]>2019-05-03 13:03:22 -0700
commit8987152ac16153999c972f08b6864c5e5ec9bdfb (patch)
treeb3a91e5cc49d7e378dcfa7449ddd2533b88bd220 /src/gallium/drivers/iris
parentc613861b23312438568a4a77dc48e383d45ef51e (diff)
iris: Resolve textures used by the program, not merely bound textures
st/mesa's PBO upload path binds a vertex shader that doesn't use any textures, but leaves the existing sampler views bound in place. This was tricking us into thinking the PBO destination might be bound for texturing in some cases. In Civilization VI, this fixes a false self- dependency issue that was preventing CCS_E compression on upload. Fixing this slightly improves frame times.
Diffstat (limited to 'src/gallium/drivers/iris')
-rw-r--r--src/gallium/drivers/iris/iris_resolve.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c
index db82afb3530..ac2676cce0d 100644
--- a/src/gallium/drivers/iris/iris_resolve.c
+++ b/src/gallium/drivers/iris/iris_resolve.c
@@ -83,10 +83,11 @@ static void
resolve_sampler_views(struct iris_context *ice,
struct iris_batch *batch,
struct iris_shader_state *shs,
+ const struct shader_info *info,
bool *draw_aux_buffer_disabled,
bool consider_framebuffer)
{
- uint32_t views = shs->bound_sampler_views;
+ uint32_t views = info ? (shs->bound_sampler_views & info->textures_used) : 0;
unsigned astc5x5_wa_bits = 0; // XXX: actual tracking
@@ -120,6 +121,7 @@ resolve_image_views(struct iris_context *ice,
bool *draw_aux_buffer_disabled,
bool consider_framebuffer)
{
+ /* TODO: Consider images used by program */
uint32_t views = shs->bound_image_views;
while (views) {
@@ -154,12 +156,13 @@ iris_predraw_resolve_inputs(struct iris_context *ice,
bool consider_framebuffer)
{
struct iris_shader_state *shs = &ice->state.shaders[stage];
+ const struct shader_info *info = iris_get_shader_info(ice, stage);
uint64_t dirty = (IRIS_DIRTY_BINDINGS_VS << stage) |
(consider_framebuffer ? IRIS_DIRTY_BINDINGS_FS : 0);
if (ice->state.dirty & dirty) {
- resolve_sampler_views(ice, batch, shs, draw_aux_buffer_disabled,
+ resolve_sampler_views(ice, batch, shs, info, draw_aux_buffer_disabled,
consider_framebuffer);
resolve_image_views(ice, batch, shs, draw_aux_buffer_disabled,
consider_framebuffer);