Module: Mesa
Branch: main
Commit: 794b0496e9467d27211d11fe7f783db3ce6a349a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=794b0496e9467d27211d11fe7f783db3ce6a349a

Author: Lionel Landwerlin <[email protected]>
Date:   Thu Dec 10 18:59:56 2020 +0200

anv: enable protected memory

Reviewed-by: José Roberto de Souza <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8064>

---

 src/intel/vulkan/anv_device.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 61ead5f7199..58dd824df06 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -495,7 +495,7 @@ get_features(const struct anv_physical_device *pdevice,
       .multiviewTessellationShader         = true,
       .variablePointersStorageBuffer       = true,
       .variablePointers                    = true,
-      .protectedMemory                     = false,
+      .protectedMemory                     = pdevice->has_protected_contexts,
       .samplerYcbcrConversion              = true,
       .shaderDrawParameters                = true,
 
@@ -1930,7 +1930,10 @@ anv_get_physical_device_properties_1_1(struct 
anv_physical_device *pdevice,
    p->pointClippingBehavior      = 
VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY;
    p->maxMultiviewViewCount      = 16;
    p->maxMultiviewInstanceIndex  = UINT32_MAX / 16;
-   p->protectedNoFault           = false;
+   /* Our protected implementation is a memory encryption mechanism, it
+    * doesn't page fault.
+    */
+   p->protectedNoFault           = true;
    /* This value doesn't matter for us today as our per-stage descriptors are
     * the real limit.
     */

Reply via email to