From 24dff4f8faa9c66f8813f759aca04fc4225ccb4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg=20Kristensen?= Date: Sun, 21 Jun 2015 23:47:10 -0700 Subject: [PATCH] vk/headers: Handle MBO fields These must be set to one. --- src/vulkan/gen75_pack.h | 10 ++++++++++ src/vulkan/gen7_pack.h | 9 +++++++++ src/vulkan/gen8_pack.h | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/src/vulkan/gen75_pack.h b/src/vulkan/gen75_pack.h index 1653cb11ae3..5d89a44efa5 100644 --- a/src/vulkan/gen75_pack.h +++ b/src/vulkan/gen75_pack.h @@ -44,6 +44,12 @@ union __gen_value { uint32_t dw; }; +static inline uint64_t +__gen_mbo(uint32_t start, uint32_t end) +{ + return (~0ul >> (64 - (end - start + 1))) << start; +} + static inline uint64_t __gen_field(uint64_t v, uint32_t start, uint32_t end) { @@ -1158,6 +1164,7 @@ GEN75_3DSTATE_BLEND_STATE_POINTERS_pack(__gen_user_data *data, void * restrict d dw[1] = __gen_offset(values->BlendStatePointer, 6, 31) | + __gen_mbo(0, 0) | 0; } @@ -1196,6 +1203,7 @@ GEN75_3DSTATE_CC_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, dw[1] = __gen_offset(values->ColorCalcStatePointer, 6, 31) | + __gen_mbo(0, 0) | 0; } @@ -1755,6 +1763,7 @@ GEN75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_pack(__gen_user_data *data, void * re dw[1] = __gen_offset(values->PointertoDEPTH_STENCIL_STATE, 6, 31) | + __gen_mbo(0, 0) | 0; } @@ -2207,6 +2216,7 @@ GEN75_3DSTATE_GATHER_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst, GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); uint32_t dw1 = __gen_field(values->GatherPoolEnable, 11, 11) | + __gen_mbo(4, 5) | __gen_field(dw_MemoryObjectControlState, 0, 3) | 0; diff --git a/src/vulkan/gen7_pack.h b/src/vulkan/gen7_pack.h index 75f193891d6..db3ddb22d2e 100644 --- a/src/vulkan/gen7_pack.h +++ b/src/vulkan/gen7_pack.h @@ -44,6 +44,12 @@ union __gen_value { uint32_t dw; }; +static inline uint64_t +__gen_mbo(uint32_t start, uint32_t end) +{ + return (~0ul >> (64 - (end - start + 1))) << start; +} + static inline uint64_t __gen_field(uint64_t v, uint32_t start, uint32_t end) { @@ -832,6 +838,7 @@ GEN7_3DSTATE_BLEND_STATE_POINTERS_pack(__gen_user_data *data, void * restrict ds dw[1] = __gen_offset(values->BlendStatePointer, 6, 31) | + __gen_mbo(0, 0) | 0; } @@ -870,6 +877,7 @@ GEN7_3DSTATE_CC_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, dw[1] = __gen_offset(values->ColorCalcStatePointer, 6, 31) | + __gen_mbo(0, 0) | 0; } @@ -1429,6 +1437,7 @@ GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_pack(__gen_user_data *data, void * res dw[1] = __gen_offset(values->PointertoDEPTH_STENCIL_STATE, 6, 31) | + __gen_mbo(0, 0) | 0; } diff --git a/src/vulkan/gen8_pack.h b/src/vulkan/gen8_pack.h index 3b9e6235975..bf6392ded4f 100644 --- a/src/vulkan/gen8_pack.h +++ b/src/vulkan/gen8_pack.h @@ -44,6 +44,12 @@ union __gen_value { uint32_t dw; }; +static inline uint64_t +__gen_mbo(uint32_t start, uint32_t end) +{ + return (~0ul >> (64 - (end - start + 1))) << start; +} + static inline uint64_t __gen_field(uint64_t v, uint32_t start, uint32_t end) { -- 2.30.2