aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_screen.c
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2018-07-31 14:47:02 +0100
committerKenneth Graunke <[email protected]>2019-02-21 10:26:08 -0800
commitd209cc51709c2511b7d063388ef79689958bb65b (patch)
tree5ba98c0a459029a1fa2ebcc6db8f37f1956e1728 /src/gallium/drivers/iris/iris_screen.c
parent93c1921ce2c0dcfebbf5c908886fb21c030ad01b (diff)
iris: AMD_pinned_memory
(rebased by Ken, mainly set res->internal_format)
Diffstat (limited to 'src/gallium/drivers/iris/iris_screen.c')
-rw-r--r--src/gallium/drivers/iris/iris_screen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c
index 7a179f9aaeb..850cbfbcf78 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -89,6 +89,7 @@ static int
iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
{
struct iris_screen *screen = (struct iris_screen *)pscreen;
+ const struct gen_device_info *devinfo = &screen->devinfo;
switch (param) {
case PIPE_CAP_NPOT_TEXTURES:
@@ -283,6 +284,14 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS:
return 0;
case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
+ /* AMD_pinned_memory assumes the flexibility of using client memory
+ * for any buffer (incl. vertex buffers) which rules out the prospect
+ * of using snooped buffers, as using snooped buffers without
+ * cogniscience is likely to be detrimental to performance and require
+ * extensive checking in the driver for correctness, e.g. to prevent
+ * illegal snoop <-> snoop transfers.
+ */
+ return devinfo->has_llc;
case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
case PIPE_CAP_TGSI_TXQS:
case PIPE_CAP_SHAREABLE_SHADERS: