projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1970390
)
util: add a resource wrapper to get resource samples
author
Dave Airlie
<airlied@redhat.com>
Mon, 30 Dec 2019 21:03:26 +0000
(07:03 +1000)
committer
Marge Bot
<eric+marge@anholt.net>
Wed, 6 May 2020 06:20:37 +0000
(06:20 +0000)
This return 1 as a baseline and should be used in allocator paths.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4122>
src/gallium/auxiliary/util/u_inlines.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_inlines.h
b/src/gallium/auxiliary/util/u_inlines.h
index 8d656f63fa3e38a5559fff4e748d157d9249e146..9a1315d01ecd3403e0c91dfe7ce66469b64e84c2 100644
(file)
--- a/
src/gallium/auxiliary/util/u_inlines.h
+++ b/
src/gallium/auxiliary/util/u_inlines.h
@@
-773,6
+773,11
@@
pipe_create_multimedia_context(struct pipe_screen *screen)
return screen->context_create(screen, NULL, flags);
}
+static inline unsigned util_res_sample_count(struct pipe_resource *res)
+{
+ return res->nr_samples > 0 ? res->nr_samples : 1;
+}
+
#ifdef __cplusplus
}
#endif