summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-10-12 03:06:08 +0200
committerMarek Olšák <[email protected]>2016-10-13 19:00:51 +0200
commita077185ea9d685967844b68aa09da6bd8aa430da (patch)
tree98462f859ae3a3c432ee2126c2d512ab545df24d /src/mesa
parent761388a0eb586b1dcaec063ee561056ed132dc1a (diff)
gallium: add PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY
For performance tuning in drivers. It filters out window system framebuffers and OpenGL renderbuffers. radeonsi will use this to guess whether a depth buffer will be read by a shader. There is no guarantee about what will actually happen. This is a departure from PIPE_BIND flags which are defined to be strict but they are useless in practice. Acked-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index a2c36ace461..7b72ffd0501 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -91,7 +91,8 @@ st_texture_create(struct st_context *st,
pt.array_size = layers;
pt.usage = PIPE_USAGE_DEFAULT;
pt.bind = bind;
- pt.flags = 0;
+ /* only set this for OpenGL textures, not renderbuffers */
+ pt.flags = PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY;
pt.nr_samples = nr_samples;
newtex = screen->resource_create(screen, &pt);