diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2020-02-05 01:02:30 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2020-02-21 16:44:38 -0800 |
commit | 1cdf5abdfaeba5a89574d7cc374e5667be2e2f93 (patch) | |
tree | de7021e969c2426632dd6feccd34c6b71d6a7131 /src/gallium/drivers/iris/iris_resource.h | |
parent | f8ab00776cc0b2a009403a8611c00341d879f9ab (diff) | |
download | mesa-1cdf5abdfaeba5a89574d7cc374e5667be2e2f93.tar.gz |
iris: Make mocs an inline helper in iris_resource.h
Now that it uses ISL rather than genxml code, there's no need for it to
live as a vtable function inside the state module. We can just make it
a static inline helper in iris_resource.h so it's available throughout
the codebase.
Fixes: a4da6008b6a ("iris: Use mocs from isl_dev.")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3720>
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.h')
-rw-r--r-- | src/gallium/drivers/iris/iris_resource.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.h b/src/gallium/drivers/iris/iris_resource.h index 52f8396bd77..d3489aa3659 100644 --- a/src/gallium/drivers/iris/iris_resource.h +++ b/src/gallium/drivers/iris/iris_resource.h @@ -27,6 +27,7 @@ #include "util/u_inlines.h" #include "util/u_range.h" #include "intel/isl/isl.h" +#include "iris_bufmgr.h" struct iris_batch; struct iris_context; @@ -289,6 +290,12 @@ iris_resource_bo(struct pipe_resource *p_res) return res->bo; } +static inline uint32_t +iris_mocs(const struct iris_bo *bo, const struct isl_device *dev) +{ + return bo && bo->external ? dev->mocs.external : dev->mocs.internal; +} + struct iris_format_info iris_format_for_usage(const struct gen_device_info *, enum pipe_format pf, isl_surf_usage_flags_t usage); |