diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-07-28 16:32:52 -0700 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-07-29 11:02:33 -0700 |
commit | fcea3e2d23b7a02f9cc4b58870ac59107bcf0050 (patch) | |
tree | 402ffe1b23c110aaa0b966230b9afb5f54740304 /src/vulkan/gen75_pack.h | |
parent | 65f3d00cd6abb3ac1dec10808fbd1be693a3aaa3 (diff) |
vk/headers: Update to new generated gen headers
This update fixes cases where a 48-bit address field was split into
two parts:
__gen_address_type MemoryAddress;
uint32_t MemoryAddressHigh;
which cases this pack code to be generated:
dw[1] =
__gen_combine_address(data, &dw[1], values->MemoryAddress, dw1);
dw[2] =
__gen_field(values->MemoryAddressHigh, 0, 15) |
0;
which breaks for addresses above 4G.
This update also fixes arrays of structs in commands and structs, for
example, we now have:
struct GEN8_BLEND_STATE_ENTRY Entry[8];
and the pack functions now write all dwords in the packet, making
valgrind happy.
Finally, we would try to pack 64 bits of blend state into a uint32_t -
that's also fixed now.
Diffstat (limited to 'src/vulkan/gen75_pack.h')
-rw-r--r-- | src/vulkan/gen75_pack.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/src/vulkan/gen75_pack.h b/src/vulkan/gen75_pack.h index 9ea8c2bcf65..583c5f25003 100644 --- a/src/vulkan/gen75_pack.h +++ b/src/vulkan/gen75_pack.h @@ -2806,7 +2806,7 @@ struct GEN75_3DSTATE_POLY_STIPPLE_PATTERN { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t PatternRow; + uint32_t PatternRow[32]; }; static inline void @@ -2823,9 +2823,11 @@ GEN75_3DSTATE_POLY_STIPPLE_PATTERN_pack(__gen_user_data *data, void * restrict d __gen_field(values->DwordLength, 0, 7) | 0; - dw[1] = - __gen_field(values->PatternRow, 0, 31) | - 0; + for (uint32_t i = 0, j = 1; i < 32; i += 1, j++) { + dw[j] = + __gen_field(values->PatternRow[i + 0], 0, 31) | + 0; + } } @@ -5283,7 +5285,7 @@ struct GEN75_MEDIA_OBJECT_PRT { #define Rootthreadqueue 0 #define VFEstateflush 1 uint32_t PRT_FenceType; - uint32_t InlineData; + uint32_t InlineData[12]; }; static inline void @@ -5313,9 +5315,11 @@ GEN75_MEDIA_OBJECT_PRT_pack(__gen_user_data *data, void * restrict dst, dw[3] = 0; - dw[4] = - __gen_field(values->InlineData, 0, 31) | - 0; + for (uint32_t i = 0, j = 4; i < 12; i += 1, j++) { + dw[j] = + __gen_field(values->InlineData[i + 0], 0, 31) | + 0; + } } @@ -7056,9 +7060,6 @@ GEN75_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, __gen_float(values->YMaxClipGuardband) | 0; - dw[12] = - 0; - } #define GEN75_BLEND_STATE_length 0x00000002 @@ -7563,7 +7564,6 @@ struct GEN75_RENDER_SURFACE_STATE { __gen_address_type AppendCounterAddress; bool AppendCounterEnable; bool MCSEnable; - uint32_t ReservedMBZ; uint32_t XOffsetforUVPlane; uint32_t YOffsetforUVPlane; #define SCS_ZERO 0 @@ -7642,7 +7642,6 @@ GEN75_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->MCSSurfacePitch, 3, 11) | __gen_field(values->AppendCounterEnable, 1, 1) | __gen_field(values->MCSEnable, 0, 0) | - __gen_field(values->ReservedMBZ, 30, 31) | __gen_field(values->XOffsetforUVPlane, 16, 29) | __gen_field(values->YOffsetforUVPlane, 0, 13) | 0; @@ -7702,9 +7701,6 @@ GEN75_SAMPLER_BORDER_COLOR_STATE_pack(__gen_user_data *data, void * restrict dst __gen_field(values->BorderColorAlpha, 0, 31) | 0; - dw[4] = - 0; - dw[16] = __gen_field(values->BorderColor, 0, 127) | __gen_field(values->BorderColor, 0, 127) | |