diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-06-10 23:11:37 -0700 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-06-11 09:25:04 -0700 |
commit | a5b49d2799a5d52c3a86f97efc2dfeecf6c9c8bf (patch) | |
tree | 499bc614b2d9827e785281412d379f31d4679049 /src | |
parent | ea7ef46cf9c91c27e70c837db0d162382efaddcb (diff) |
vk: Use generated headers with fixed point support
The generated headers now convert float in the template struct to the
correct fixed point format.
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/device.c | 10 | ||||
-rw-r--r-- | src/vulkan/gen75_pack.h | 244 | ||||
-rw-r--r-- | src/vulkan/gen7_pack.h | 112 | ||||
-rw-r--r-- | src/vulkan/gen8_pack.h | 192 | ||||
-rw-r--r-- | src/vulkan/image.c | 8 |
5 files changed, 283 insertions, 283 deletions
diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 3df707429e1..7ee820b1bc5 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1524,7 +1524,7 @@ fill_buffer_surface_state(void *state, VkFormat format, .SamplerL2BypassModeDisable = true, .RenderCacheReadWriteMode = WriteOnlyCache, .MemoryObjectControlState = GEN8_MOCS, - .BaseMipLevel = 0, + .BaseMipLevel = 0.0, .SurfaceQPitch = 0, .Height = (num_elements >> 7) & 0x3fff, .Width = num_elements & 0x7f, @@ -1545,7 +1545,7 @@ fill_buffer_surface_state(void *state, VkFormat format, .ShaderChannelSelectGreen = SCS_GREEN, .ShaderChannelSelectBlue = SCS_BLUE, .ShaderChannelSelectAlpha = SCS_ALPHA, - .ResourceMinLOD = 0, + .ResourceMinLOD = 0.0, /* FIXME: We assume that the image must be bound at this time. */ .SurfaceBaseAddress = { NULL, offset }, }; @@ -1648,14 +1648,14 @@ VkResult anv_CreateSampler( .SamplerDisable = false, .TextureBorderColorMode = DX10OGL, .LODPreClampMode = 0, - .BaseMipLevel = 0, + .BaseMipLevel = 0.0, .MipModeFilter = vk_to_gen_mipmap_mode[pCreateInfo->mipMode], .MagModeFilter = mag_filter, .MinModeFilter = min_filter, .TextureLODBias = pCreateInfo->mipLodBias * 256, .AnisotropicAlgorithm = EWAApproximation, - .MinLOD = pCreateInfo->minLod * 256, - .MaxLOD = pCreateInfo->maxLod * 256, + .MinLOD = pCreateInfo->minLod, + .MaxLOD = pCreateInfo->maxLod, .ChromaKeyEnable = 0, .ChromaKeyIndex = 0, .ChromaKeyMode = 0, diff --git a/src/vulkan/gen75_pack.h b/src/vulkan/gen75_pack.h index f9b34d89df8..3796d89967d 100644 --- a/src/vulkan/gen75_pack.h +++ b/src/vulkan/gen75_pack.h @@ -616,10 +616,10 @@ struct GEN75_3DSTATE_AA_LINE_PARAMETERS { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t AACoverageBias; - uint32_t AACoverageSlope; - uint32_t AACoverageEndCapBias; - uint32_t AACoverageEndCapSlope; + float AACoverageBias; + float AACoverageSlope; + float AACoverageEndCapBias; + float AACoverageEndCapSlope; }; static inline void @@ -637,13 +637,13 @@ GEN75_3DSTATE_AA_LINE_PARAMETERS_pack(__gen_user_data *data, void * restrict dst 0; dw[1] = - __gen_field(values->AACoverageBias, 16, 23) | - __gen_field(values->AACoverageSlope, 0, 7) | + __gen_field(values->AACoverageBias * (1 << 8), 16, 23) | + __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) | 0; dw[2] = - __gen_field(values->AACoverageEndCapBias, 16, 23) | - __gen_field(values->AACoverageEndCapSlope, 0, 7) | + __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) | + __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) | 0; } @@ -1340,8 +1340,8 @@ struct GEN75_3DSTATE_CLIP { #define Vertex1 1 #define Vertex2 2 uint32_t TriangleFanProvokingVertexSelect; - uint32_t MinimumPointWidth; - uint32_t MaximumPointWidth; + float MinimumPointWidth; + float MaximumPointWidth; uint32_t ForceZeroRTAIndexEnable; uint32_t MaximumVPIndex; }; @@ -1385,8 +1385,8 @@ GEN75_3DSTATE_CLIP_pack(__gen_user_data *data, void * restrict dst, 0; dw[3] = - __gen_field(values->MinimumPointWidth, 17, 27) | - __gen_field(values->MaximumPointWidth, 6, 16) | + __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) | + __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) | __gen_field(values->ForceZeroRTAIndexEnable, 5, 5) | __gen_field(values->MaximumVPIndex, 0, 3) | 0; @@ -2584,7 +2584,7 @@ struct GEN75_3DSTATE_LINE_STIPPLE { uint32_t CurrentRepeatCounter; uint32_t CurrentStippleIndex; uint32_t LineStipplePattern; - uint32_t LineStippleInverseRepeatCount; + float LineStippleInverseRepeatCount; uint32_t LineStippleRepeatCount; }; @@ -2610,7 +2610,7 @@ GEN75_3DSTATE_LINE_STIPPLE_pack(__gen_user_data *data, void * restrict dst, 0; dw[2] = - __gen_field(values->LineStippleInverseRepeatCount, 15, 31) | + __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) | __gen_field(values->LineStippleRepeatCount, 0, 8) | 0; @@ -2679,22 +2679,22 @@ struct GEN75_3DSTATE_MULTISAMPLE { #define NUMSAMPLES_4 2 #define NUMSAMPLES_8 3 uint32_t NumberofMultisamples; - uint32_t Sample3XOffset; - uint32_t Sample3YOffset; - uint32_t Sample2XOffset; - uint32_t Sample2YOffset; - uint32_t Sample1XOffset; - uint32_t Sample1YOffset; - uint32_t Sample0XOffset; - uint32_t Sample0YOffset; - uint32_t Sample7XOffset; - uint32_t Sample7YOffset; - uint32_t Sample6XOffset; - uint32_t Sample6YOffset; - uint32_t Sample5XOffset; - uint32_t Sample5YOffset; - uint32_t Sample4XOffset; - uint32_t Sample4YOffset; + float Sample3XOffset; + float Sample3YOffset; + float Sample2XOffset; + float Sample2YOffset; + float Sample1XOffset; + float Sample1YOffset; + float Sample0XOffset; + float Sample0YOffset; + float Sample7XOffset; + float Sample7YOffset; + float Sample6XOffset; + float Sample6YOffset; + float Sample5XOffset; + float Sample5YOffset; + float Sample4XOffset; + float Sample4YOffset; }; static inline void @@ -2718,25 +2718,25 @@ GEN75_3DSTATE_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst, 0; dw[2] = - __gen_field(values->Sample3XOffset, 28, 31) | - __gen_field(values->Sample3YOffset, 24, 27) | - __gen_field(values->Sample2XOffset, 20, 23) | - __gen_field(values->Sample2YOffset, 16, 19) | - __gen_field(values->Sample1XOffset, 12, 15) | - __gen_field(values->Sample1YOffset, 8, 11) | - __gen_field(values->Sample0XOffset, 4, 7) | - __gen_field(values->Sample0YOffset, 0, 3) | + __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) | + __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) | + __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) | + __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) | + __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) | + __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) | + __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) | + __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) | 0; dw[3] = - __gen_field(values->Sample7XOffset, 28, 31) | - __gen_field(values->Sample7YOffset, 24, 27) | - __gen_field(values->Sample6XOffset, 20, 23) | - __gen_field(values->Sample6YOffset, 16, 19) | - __gen_field(values->Sample5XOffset, 12, 15) | - __gen_field(values->Sample5YOffset, 8, 11) | - __gen_field(values->Sample4XOffset, 4, 7) | - __gen_field(values->Sample4YOffset, 0, 3) | + __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) | + __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) | + __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) | + __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) | + __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) | + __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) | + __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) | + __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) | 0; } @@ -3175,38 +3175,38 @@ struct GEN75_3DSTATE_RAST_MULTISAMPLE { #define NRM_NUMRASTSAMPLES_8 3 #define NRM_NUMRASTSAMPLES_16 4 uint32_t NumberofRasterizationMultisamples; - uint32_t Sample3XOffset; - uint32_t Sample3YOffset; - uint32_t Sample2XOffset; - uint32_t Sample2YOffset; - uint32_t Sample1XOffset; - uint32_t Sample1YOffset; - uint32_t Sample0XOffset; - uint32_t Sample0YOffset; - uint32_t Sample7XOffset; - uint32_t Sample7YOffset; - uint32_t Sample6XOffset; - uint32_t Sample6YOffset; - uint32_t Sample5XOffset; - uint32_t Sample5YOffset; - uint32_t Sample4XOffset; - uint32_t Sample4YOffset; - uint32_t Sample11XOffset; - uint32_t Sample11YOffset; - uint32_t Sample10XOffset; - uint32_t Sample10YOffset; - uint32_t Sample9XOffset; - uint32_t Sample9YOffset; - uint32_t Sample8XOffset; - uint32_t Sample8YOffset; - uint32_t Sample15XOffset; - uint32_t Sample15YOffset; - uint32_t Sample14XOffset; - uint32_t Sample14YOffset; - uint32_t Sample13XOffset; - uint32_t Sample13YOffset; - uint32_t Sample12XOffset; - uint32_t Sample12YOffset; + float Sample3XOffset; + float Sample3YOffset; + float Sample2XOffset; + float Sample2YOffset; + float Sample1XOffset; + float Sample1YOffset; + float Sample0XOffset; + float Sample0YOffset; + float Sample7XOffset; + float Sample7YOffset; + float Sample6XOffset; + float Sample6YOffset; + float Sample5XOffset; + float Sample5YOffset; + float Sample4XOffset; + float Sample4YOffset; + float Sample11XOffset; + float Sample11YOffset; + float Sample10XOffset; + float Sample10YOffset; + float Sample9XOffset; + float Sample9YOffset; + float Sample8XOffset; + float Sample8YOffset; + float Sample15XOffset; + float Sample15YOffset; + float Sample14XOffset; + float Sample14YOffset; + float Sample13XOffset; + float Sample13YOffset; + float Sample12XOffset; + float Sample12YOffset; }; static inline void @@ -3228,47 +3228,47 @@ GEN75_3DSTATE_RAST_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst, 0; dw[2] = - __gen_field(values->Sample3XOffset, 28, 31) | - __gen_field(values->Sample3YOffset, 24, 27) | - __gen_field(values->Sample2XOffset, 20, 23) | - __gen_field(values->Sample2YOffset, 16, 19) | - __gen_field(values->Sample1XOffset, 12, 15) | - __gen_field(values->Sample1YOffset, 8, 11) | - __gen_field(values->Sample0XOffset, 4, 7) | - __gen_field(values->Sample0YOffset, 0, 3) | + __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) | + __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) | + __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) | + __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) | + __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) | + __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) | + __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) | + __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) | 0; dw[3] = - __gen_field(values->Sample7XOffset, 28, 31) | - __gen_field(values->Sample7YOffset, 24, 27) | - __gen_field(values->Sample6XOffset, 20, 23) | - __gen_field(values->Sample6YOffset, 16, 19) | - __gen_field(values->Sample5XOffset, 12, 15) | - __gen_field(values->Sample5YOffset, 8, 11) | - __gen_field(values->Sample4XOffset, 4, 7) | - __gen_field(values->Sample4YOffset, 0, 3) | + __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) | + __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) | + __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) | + __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) | + __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) | + __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) | + __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) | + __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) | 0; dw[4] = - __gen_field(values->Sample11XOffset, 28, 31) | - __gen_field(values->Sample11YOffset, 24, 27) | - __gen_field(values->Sample10XOffset, 20, 23) | - __gen_field(values->Sample10YOffset, 16, 19) | - __gen_field(values->Sample9XOffset, 12, 15) | - __gen_field(values->Sample9YOffset, 8, 11) | - __gen_field(values->Sample8XOffset, 4, 7) | - __gen_field(values->Sample8YOffset, 0, 3) | + __gen_field(values->Sample11XOffset * (1 << 4), 28, 31) | + __gen_field(values->Sample11YOffset * (1 << 4), 24, 27) | + __gen_field(values->Sample10XOffset * (1 << 4), 20, 23) | + __gen_field(values->Sample10YOffset * (1 << 4), 16, 19) | + __gen_field(values->Sample9XOffset * (1 << 4), 12, 15) | + __gen_field(values->Sample9YOffset * (1 << 4), 8, 11) | + __gen_field(values->Sample8XOffset * (1 << 4), 4, 7) | + __gen_field(values->Sample8YOffset * (1 << 4), 0, 3) | 0; dw[5] = - __gen_field(values->Sample15XOffset, 28, 31) | - __gen_field(values->Sample15YOffset, 24, 27) | - __gen_field(values->Sample14XOffset, 20, 23) | - __gen_field(values->Sample14YOffset, 16, 19) | - __gen_field(values->Sample13XOffset, 12, 15) | - __gen_field(values->Sample13YOffset, 8, 11) | - __gen_field(values->Sample12XOffset, 4, 7) | - __gen_field(values->Sample12YOffset, 0, 3) | + __gen_field(values->Sample15XOffset * (1 << 4), 28, 31) | + __gen_field(values->Sample15YOffset * (1 << 4), 24, 27) | + __gen_field(values->Sample14XOffset * (1 << 4), 20, 23) | + __gen_field(values->Sample14YOffset * (1 << 4), 16, 19) | + __gen_field(values->Sample13XOffset * (1 << 4), 12, 15) | + __gen_field(values->Sample13YOffset * (1 << 4), 8, 11) | + __gen_field(values->Sample12XOffset * (1 << 4), 4, 7) | + __gen_field(values->Sample12YOffset * (1 << 4), 0, 3) | 0; } @@ -3814,7 +3814,7 @@ struct GEN75_3DSTATE_SF { #define CULLMODE_FRONT 2 #define CULLMODE_BACK 3 uint32_t CullMode; - uint32_t LineWidth; + float LineWidth; uint32_t LineEndCapAntialiasingRegionWidth; uint32_t LineStippleEnable; uint32_t ScissorRectangleEnable; @@ -3834,7 +3834,7 @@ struct GEN75_3DSTATE_SF { uint32_t AALineDistanceMode; uint32_t VertexSubPixelPrecisionSelect; uint32_t UsePointWidthState; - uint32_t PointWidth; + float PointWidth; uint32_t GlobalDepthOffsetConstant; uint32_t GlobalDepthOffsetScale; uint32_t GlobalDepthOffsetClamp; @@ -3870,7 +3870,7 @@ GEN75_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, dw[2] = __gen_field(values->AntiAliasingEnable, 31, 31) | __gen_field(values->CullMode, 29, 30) | - __gen_field(values->LineWidth, 18, 27) | + __gen_field(values->LineWidth * (1 << 7), 18, 27) | __gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) | __gen_field(values->LineStippleEnable, 14, 14) | __gen_field(values->ScissorRectangleEnable, 11, 11) | @@ -3886,7 +3886,7 @@ GEN75_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->AALineDistanceMode, 14, 14) | __gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) | __gen_field(values->UsePointWidthState, 11, 11) | - __gen_field(values->PointWidth, 0, 10) | + __gen_field(values->PointWidth * (1 << 3), 0, 10) | 0; dw[4] = @@ -7548,7 +7548,7 @@ struct GEN75_RENDER_SURFACE_STATE { uint32_t ShaderChannelSelectG; uint32_t ShaderChannelSelectB; uint32_t ShaderChannelSelectA; - uint32_t ResourceMinLOD; + float ResourceMinLOD; }; static inline void @@ -7627,7 +7627,7 @@ GEN75_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->ShaderChannelSelectG, 22, 24) | __gen_field(values->ShaderChannelSelectB, 19, 21) | __gen_field(values->ShaderChannelSelectA, 16, 18) | - __gen_field(values->ResourceMinLOD, 0, 11) | + __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) | 0; } @@ -7694,7 +7694,7 @@ struct GEN75_SAMPLER_STATE { uint32_t TextureBorderColorMode; #define OGL 1 uint32_t LODPreClampEnable; - uint32_t BaseMipLevel; + float BaseMipLevel; #define MIPFILTER_NONE 0 #define MIPFILTER_NEAREST 1 #define MIPFILTER_LINEAR 3 @@ -7713,8 +7713,8 @@ struct GEN75_SAMPLER_STATE { #define LEGACY 0 #define EWAApproximation 1 uint32_t AnisotropicAlgorithm; - uint32_t MinLOD; - uint32_t MaxLOD; + float MinLOD; + float MaxLOD; #define PREFILTEROPALWAYS 0 #define PREFILTEROPNEVER 1 #define PREFILTEROPLESS 2 @@ -7769,7 +7769,7 @@ GEN75_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->SamplerDisable, 31, 31) | __gen_field(values->TextureBorderColorMode, 29, 29) | __gen_field(values->LODPreClampEnable, 28, 28) | - __gen_field(values->BaseMipLevel, 22, 26) | + __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) | __gen_field(values->MipModeFilter, 20, 21) | __gen_field(values->MagModeFilter, 17, 19) | __gen_field(values->MinModeFilter, 14, 16) | @@ -7778,8 +7778,8 @@ GEN75_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, 0; dw[1] = - __gen_field(values->MinLOD, 20, 31) | - __gen_field(values->MaxLOD, 8, 19) | + __gen_field(values->MinLOD * (1 << 8), 20, 31) | + __gen_field(values->MaxLOD * (1 << 8), 8, 19) | __gen_field(values->ShadowFunction, 1, 3) | __gen_field(values->CubeSurfaceControlMode, 0, 0) | 0; diff --git a/src/vulkan/gen7_pack.h b/src/vulkan/gen7_pack.h index 5e56ce2d367..09a477bc663 100644 --- a/src/vulkan/gen7_pack.h +++ b/src/vulkan/gen7_pack.h @@ -576,10 +576,10 @@ struct GEN7_3DSTATE_AA_LINE_PARAMETERS { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t AACoverageBias; - uint32_t AACoverageSlope; - uint32_t AACoverageEndCapBias; - uint32_t AACoverageEndCapSlope; + float AACoverageBias; + float AACoverageSlope; + float AACoverageEndCapBias; + float AACoverageEndCapSlope; }; static inline void @@ -597,13 +597,13 @@ GEN7_3DSTATE_AA_LINE_PARAMETERS_pack(__gen_user_data *data, void * restrict dst, 0; dw[1] = - __gen_field(values->AACoverageBias, 16, 23) | - __gen_field(values->AACoverageSlope, 0, 7) | + __gen_field(values->AACoverageBias * (1 << 8), 16, 23) | + __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) | 0; dw[2] = - __gen_field(values->AACoverageEndCapBias, 16, 23) | - __gen_field(values->AACoverageEndCapSlope, 0, 7) | + __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) | + __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) | 0; } @@ -1014,8 +1014,8 @@ struct GEN7_3DSTATE_CLIP { #define Vertex1 1 #define Vertex2 2 uint32_t TriangleFanProvokingVertexSelect; - uint32_t MinimumPointWidth; - uint32_t MaximumPointWidth; + float MinimumPointWidth; + float MaximumPointWidth; uint32_t ForceZeroRTAIndexEnable; uint32_t MaximumVPIndex; }; @@ -1059,8 +1059,8 @@ GEN7_3DSTATE_CLIP_pack(__gen_user_data *data, void * restrict dst, 0; dw[3] = - __gen_field(values->MinimumPointWidth, 17, 27) | - __gen_field(values->MaximumPointWidth, 6, 16) | + __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) | + __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) | __gen_field(values->ForceZeroRTAIndexEnable, 5, 5) | __gen_field(values->MaximumVPIndex, 0, 3) | 0; @@ -1937,7 +1937,7 @@ struct GEN7_3DSTATE_LINE_STIPPLE { uint32_t CurrentRepeatCounter; uint32_t CurrentStippleIndex; uint32_t LineStipplePattern; - uint32_t LineStippleInverseRepeatCount; + float LineStippleInverseRepeatCount; uint32_t LineStippleRepeatCount; }; @@ -1963,7 +1963,7 @@ GEN7_3DSTATE_LINE_STIPPLE_pack(__gen_user_data *data, void * restrict dst, 0; dw[2] = - __gen_field(values->LineStippleInverseRepeatCount, 15, 31) | + __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) | __gen_field(values->LineStippleRepeatCount, 0, 8) | 0; @@ -2031,22 +2031,22 @@ struct GEN7_3DSTATE_MULTISAMPLE { #define NUMSAMPLES_4 2 #define NUMSAMPLES_8 3 uint32_t NumberofMultisamples; - uint32_t Sample3XOffset; - uint32_t Sample3YOffset; - uint32_t Sample2XOffset; - uint32_t Sample2YOffset; - uint32_t Sample1XOffset; - uint32_t Sample1YOffset; - uint32_t Sample0XOffset; - uint32_t Sample0YOffset; - uint32_t Sample7XOffset; - uint32_t Sample7YOffset; - uint32_t Sample6XOffset; - uint32_t Sample6YOffset; - uint32_t Sample5XOffset; - uint32_t Sample5YOffset; - uint32_t Sample4XOffset; - uint32_t Sample4YOffset; + float Sample3XOffset; + float Sample3YOffset; + float Sample2XOffset; + float Sample2YOffset; + float Sample1XOffset; + float Sample1YOffset; + float Sample0XOffset; + float Sample0YOffset; + float Sample7XOffset; + float Sample7YOffset; + float Sample6XOffset; + float Sample6YOffset; + float Sample5XOffset; + float Sample5YOffset; + float Sample4XOffset; + float Sample4YOffset; }; static inline void @@ -2069,25 +2069,25 @@ GEN7_3DSTATE_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst, 0; dw[2] = - __gen_field(values->Sample3XOffset, 28, 31) | - __gen_field(values->Sample3YOffset, 24, 27) | - __gen_field(values->Sample2XOffset, 20, 23) | - __gen_field(values->Sample2YOffset, 16, 19) | - __gen_field(values->Sample1XOffset, 12, 15) | - __gen_field(values->Sample1YOffset, 8, 11) | - __gen_field(values->Sample0XOffset, 4, 7) | - __gen_field(values->Sample0YOffset, 0, 3) | + __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) | + __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) | + __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) | + __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) | + __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) | + __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) | + __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) | + __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) | 0; dw[3] = - __gen_field(values->Sample7XOffset, 28, 31) | - __gen_field(values->Sample7YOffset, 24, 27) | - __gen_field(values->Sample6XOffset, 20, 23) | - __gen_field(values->Sample6YOffset, 16, 19) | - __gen_field(values->Sample5XOffset, 12, 15) | - __gen_field(values->Sample5YOffset, 8, 11) | - __gen_field(values->Sample4XOffset, 4, 7) | - __gen_field(values->Sample4YOffset, 0, 3) | + __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) | + __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) | + __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) | + __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) | + __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) | + __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) | + __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) | + __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) | 0; } @@ -3050,7 +3050,7 @@ struct GEN7_3DSTATE_SF { #define CULLMODE_FRONT 2 #define CULLMODE_BACK 3 uint32_t CullMode; - uint32_t LineWidth; + float LineWidth; uint32_t LineEndCapAntialiasingRegionWidth; uint32_t ScissorRectangleEnable; uint32_t MultisampleRasterizationMode; @@ -3068,7 +3068,7 @@ struct GEN7_3DSTATE_SF { uint32_t AALineDistanceMode; uint32_t VertexSubPixelPrecisionSelect; uint32_t UsePointWidthState; - uint32_t PointWidth; + float PointWidth; uint32_t GlobalDepthOffsetConstant; uint32_t GlobalDepthOffsetScale; uint32_t GlobalDepthOffsetClamp; @@ -3104,7 +3104,7 @@ GEN7_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, dw[2] = __gen_field(values->AntiAliasingEnable, 31, 31) | __gen_field(values->CullMode, 29, 30) | - __gen_field(values->LineWidth, 18, 27) | + __gen_field(values->LineWidth * (1 << 7), 18, 27) | __gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) | __gen_field(values->ScissorRectangleEnable, 11, 11) | __gen_field(values->MultisampleRasterizationMode, 8, 9) | @@ -3118,7 +3118,7 @@ GEN7_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->AALineDistanceMode, 14, 14) | __gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) | __gen_field(values->UsePointWidthState, 11, 11) | - __gen_field(values->PointWidth, 0, 10) | + __gen_field(values->PointWidth * (1 << 3), 0, 10) | 0; dw[4] = @@ -6249,7 +6249,7 @@ struct GEN7_SAMPLER_STATE { uint32_t TextureBorderColorMode; #define OGL 1 uint32_t LODPreClampEnable; - uint32_t BaseMipLevel; + float BaseMipLevel; #define MIPFILTER_NONE 0 #define MIPFILTER_NEAREST 1 #define MIPFILTER_LINEAR 3 @@ -6268,8 +6268,8 @@ struct GEN7_SAMPLER_STATE { #define LEGACY 0 #define EWAApproximation 1 uint32_t AnisotropicAlgorithm; - uint32_t MinLOD; - uint32_t MaxLOD; + float MinLOD; + float MaxLOD; #define PREFILTEROPALWAYS 0 #define PREFILTEROPNEVER 1 #define PREFILTEROPLESS 2 @@ -6323,7 +6323,7 @@ GEN7_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->SamplerDisable, 31, 31) | __gen_field(values->TextureBorderColorMode, 29, 29) | __gen_field(values->LODPreClampEnable, 28, 28) | - __gen_field(values->BaseMipLevel, 22, 26) | + __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) | __gen_field(values->MipModeFilter, 20, 21) | __gen_field(values->MagModeFilter, 17, 19) | __gen_field(values->MinModeFilter, 14, 16) | @@ -6332,8 +6332,8 @@ GEN7_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, 0; dw[1] = - __gen_field(values->MinLOD, 20, 31) | - __gen_field(values->MaxLOD, 8, 19) | + __gen_field(values->MinLOD * (1 << 8), 20, 31) | + __gen_field(values->MaxLOD * (1 << 8), 8, 19) | __gen_field(values->ShadowFunction, 1, 3) | __gen_field(values->CubeSurfaceControlMode, 0, 0) | 0; diff --git a/src/vulkan/gen8_pack.h b/src/vulkan/gen8_pack.h index 54ad55ab490..117e64ace7b 100644 --- a/src/vulkan/gen8_pack.h +++ b/src/vulkan/gen8_pack.h @@ -1004,14 +1004,14 @@ struct GEN8_3DSTATE_AA_LINE_PARAMETERS { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t AAPointCoverageBias; - uint32_t AACoverageBias; - uint32_t AAPointCoverageSlope; - uint32_t AACoverageSlope; - uint32_t AAPointCoverageEndCapBias; - uint32_t AACoverageEndCapBias; - uint32_t AAPointCoverageEndCapSlope; - uint32_t AACoverageEndCapSlope; + float AAPointCoverageBias; + float AACoverageBias; + float AAPointCoverageSlope; + float AACoverageSlope; + float AAPointCoverageEndCapBias; + float AACoverageEndCapBias; + float AAPointCoverageEndCapSlope; + float AACoverageEndCapSlope; }; static inline void @@ -1029,17 +1029,17 @@ GEN8_3DSTATE_AA_LINE_PARAMETERS_pack(__gen_user_data *data, void * restrict dst, 0; dw[1] = - __gen_field(values->AAPointCoverageBias, 24, 31) | - __gen_field(values->AACoverageBias, 16, 23) | - __gen_field(values->AAPointCoverageSlope, 8, 15) | - __gen_field(values->AACoverageSlope, 0, 7) | + __gen_field(values->AAPointCoverageBias * (1 << 8), 24, 31) | + __gen_field(values->AACoverageBias * (1 << 8), 16, 23) | + __gen_field(values->AAPointCoverageSlope * (1 << 8), 8, 15) | + __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) | 0; dw[2] = - __gen_field(values->AAPointCoverageEndCapBias, 24, 31) | - __gen_field(values->AACoverageEndCapBias, 16, 23) | - __gen_field(values->AAPointCoverageEndCapSlope, 8, 15) | - __gen_field(values->AACoverageEndCapSlope, 0, 7) | + __gen_field(values->AAPointCoverageEndCapBias * (1 << 8), 24, 31) | + __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) | + __gen_field(values->AAPointCoverageEndCapSlope * (1 << 8), 8, 15) | + __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) | 0; } @@ -1738,8 +1738,8 @@ struct GEN8_3DSTATE_CLIP { uint32_t TriangleStripListProvokingVertexSelect; uint32_t LineStripListProvokingVertexSelect; uint32_t TriangleFanProvokingVertexSelect; - uint32_t MinimumPointWidth; - uint32_t MaximumPointWidth; + float MinimumPointWidth; + float MaximumPointWidth; uint32_t ForceZeroRTAIndexEnable; uint32_t MaximumVPIndex; }; @@ -1783,8 +1783,8 @@ GEN8_3DSTATE_CLIP_pack(__gen_user_data *data, void * restrict dst, 0; dw[3] = - __gen_field(values->MinimumPointWidth, 17, 27) | - __gen_field(values->MaximumPointWidth, 6, 16) | + __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) | + __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) | __gen_field(values->ForceZeroRTAIndexEnable, 5, 5) | __gen_field(values->MaximumVPIndex, 0, 3) | 0; @@ -3040,7 +3040,7 @@ struct GEN8_3DSTATE_LINE_STIPPLE { uint32_t CurrentRepeatCounter; uint32_t CurrentStippleIndex; uint32_t LineStipplePattern; - uint32_t LineStippleInverseRepeatCount; + float LineStippleInverseRepeatCount; uint32_t LineStippleRepeatCount; }; @@ -3066,7 +3066,7 @@ GEN8_3DSTATE_LINE_STIPPLE_pack(__gen_user_data *data, void * restrict dst, 0; dw[2] = - __gen_field(values->LineStippleInverseRepeatCount, 15, 31) | + __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) | __gen_field(values->LineStippleRepeatCount, 0, 8) | 0; @@ -4139,36 +4139,36 @@ struct GEN8_3DSTATE_SAMPLE_PATTERN { uint32_t _3DCommandOpcode; uint32_t _3DCommandSubOpcode; uint32_t DwordLength; - uint32_t _8xSample7XOffset; - uint32_t _8xSample7YOffset; - uint32_t _8xSample6XOffset; - uint32_t _8xSample6YOffset; - uint32_t _8xSample5XOffset; - uint32_t _8xSample5YOffset; - uint32_t _8xSample4XOffset; - uint32_t _8xSample4YOffset; - uint32_t _8xSample3XOffset; - uint32_t _8xSample3YOffset; - uint32_t _8xSample2XOffset; - uint32_t _8xSample2YOffset; - uint32_t _8xSample1XOffset; - uint32_t _8xSample1YOffset; - uint32_t _8xSample0XOffset; - uint32_t _8xSample0YOffset; - uint32_t _4xSample3XOffset; - uint32_t _4xSample3YOffset; - uint32_t _4xSample2XOffset; - uint32_t _4xSample2YOffset; - uint32_t _4xSample1XOffset; - uint32_t _4xSample1YOffset; - uint32_t _4xSample0XOffset; - uint32_t _4xSample0YOffset; - uint32_t _1xSample0XOffset; - uint32_t _1xSample0YOffset; - uint32_t _2xSample1XOffset; - uint32_t _2xSample1YOffset; - uint32_t _2xSample0XOffset; - uint32_t _2xSample0YOffset; + float _8xSample7XOffset; + float _8xSample7YOffset; + float _8xSample6XOffset; + float _8xSample6YOffset; + float _8xSample5XOffset; + float _8xSample5YOffset; + float _8xSample4XOffset; + float _8xSample4YOffset; + float _8xSample3XOffset; + float _8xSample3YOffset; + float _8xSample2XOffset; + float _8xSample2YOffset; + float _8xSample1XOffset; + float _8xSample1YOffset; + float _8xSample0XOffset; + float _8xSample0YOffset; + float _4xSample3XOffset; + float _4xSample3YOffset; + float _4xSample2XOffset; + float _4xSample2YOffset; + float _4xSample1XOffset; + float _4xSample1YOffset; + float _4xSample0XOffset; + float _4xSample0YOffset; + float _1xSample0XOffset; + float _1xSample0YOffset; + float _2xSample1XOffset; + float _2xSample1YOffset; + float _2xSample0XOffset; + float _2xSample0YOffset; }; static inline void @@ -4189,45 +4189,45 @@ GEN8_3DSTATE_SAMPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst, 0; dw[5] = - __gen_field(values->_8xSample7XOffset, 28, 31) | - __gen_field(values->_8xSample7YOffset, 24, 27) | - __gen_field(values->_8xSample6XOffset, 20, 23) | - __gen_field(values->_8xSample6YOffset, 16, 19) | - __gen_field(values->_8xSample5XOffset, 12, 15) | - __gen_field(values->_8xSample5YOffset, 8, 11) | - __gen_field(values->_8xSample4XOffset, 4, 7) | - __gen_field(values->_8xSample4YOffset, 0, 3) | + __gen_field(values->_8xSample7XOffset * (1 << 4), 28, 31) | + __gen_field(values->_8xSample7YOffset * (1 << 4), 24, 27) | + __gen_field(values->_8xSample6XOffset * (1 << 4), 20, 23) | + __gen_field(values->_8xSample6YOffset * (1 << 4), 16, 19) | + __gen_field(values->_8xSample5XOffset * (1 << 4), 12, 15) | + __gen_field(values->_8xSample5YOffset * (1 << 4), 8, 11) | + __gen_field(values->_8xSample4XOffset * (1 << 4), 4, 7) | + __gen_field(values->_8xSample4YOffset * (1 << 4), 0, 3) | 0; dw[6] = - __gen_field(values->_8xSample3XOffset, 28, 31) | - __gen_field(values->_8xSample3YOffset, 24, 27) | - __gen_field(values->_8xSample2XOffset, 20, 23) | - __gen_field(values->_8xSample2YOffset, 16, 19) | - __gen_field(values->_8xSample1XOffset, 12, 15) | - __gen_field(values->_8xSample1YOffset, 8, 11) | - __gen_field(values->_8xSample0XOffset, 4, 7) | - __gen_field(values->_8xSample0YOffset, 0, 3) | + __gen_field(values->_8xSample3XOffset * (1 << 4), 28, 31) | + __gen_field(values->_8xSample3YOffset * (1 << 4), 24, 27) | + __gen_field(values->_8xSample2XOffset * (1 << 4), 20, 23) | + __gen_field(values->_8xSample2YOffset * (1 << 4), 16, 19) | + __gen_field(values->_8xSample1XOffset * (1 << 4), 12, 15) | + __gen_field(values->_8xSample1YOffset * (1 << 4), 8, 11) | + __gen_field(values->_8xSample0XOffset * (1 << 4), 4, 7) | + __gen_field(values->_8xSample0YOffset * (1 << 4), 0, 3) | 0; dw[7] = - __gen_field(values->_4xSample3XOffset, 28, 31) | - __gen_field(values->_4xSample3YOffset, 24, 27) | - __gen_field(values->_4xSample2XOffset, 20, 23) | - __gen_field(values->_4xSample2YOffset, 16, 19) | - __gen_field(values->_4xSample1XOffset, 12, 15) | - __gen_field(values->_4xSample1YOffset, 8, 11) | - __gen_field(values->_4xSample0XOffset, 4, 7) | - __gen_field(values->_4xSample0YOffset, 0, 3) | + __gen_field(values->_4xSample3XOffset * (1 << 4), 28, 31) | + __gen_field(values->_4xSample3YOffset * (1 << 4), 24, 27) | + __gen_field(values->_4xSample2XOffset * (1 << 4), 20, 23) | + __gen_field(values->_4xSample2YOffset * (1 << 4), 16, 19) | + __gen_field(values->_4xSample1XOffset * (1 << 4), 12, 15) | + __gen_field(values->_4xSample1YOffset * (1 << 4), 8, 11) | + __gen_field(values->_4xSample0XOffset * (1 << 4), 4, 7) | + __gen_field(values->_4xSample0YOffset * (1 << 4), 0, 3) | 0; dw[8] = - __gen_field(values->_1xSample0XOffset, 20, 23) | - __gen_field(values->_1xSample0YOffset, 16, 19) | - __gen_field(values->_2xSample1XOffset, 12, 15) | - __gen_field(values->_2xSample1YOffset, 8, 11) | - __gen_field(values->_2xSample0XOffset, 4, 7) | - __gen_field(values->_2xSample0YOffset, 0, 3) | + __gen_field(values->_1xSample0XOffset * (1 << 4), 20, 23) | + __gen_field(values->_1xSample0YOffset * (1 << 4), 16, 19) | + __gen_field(values->_2xSample1XOffset * (1 << 4), 12, 15) | + __gen_field(values->_2xSample1YOffset * (1 << 4), 8, 11) | + __gen_field(values->_2xSample0XOffset * (1 << 4), 4, 7) | + __gen_field(values->_2xSample0YOffset * (1 << 4), 0, 3) | 0; } @@ -4476,7 +4476,7 @@ struct GEN8_3DSTATE_SF { uint32_t LegacyGlobalDepthBiasEnable; uint32_t StatisticsEnable; uint32_t ViewportTransformEnable; - uint32_t LineWidth; + float LineWidth; #define _05pixels 0 #define _10pixels 1 #define _20pixels 2 @@ -4493,7 +4493,7 @@ struct GEN8_3DSTATE_SF { #define Vertex 0 #define State 1 uint32_t PointWidthSource; - uint32_t PointWidth; + float PointWidth; }; static inline void @@ -4517,7 +4517,7 @@ GEN8_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, 0; dw[2] = - __gen_field(values->LineWidth, 18, 27) | + __gen_field(values->LineWidth * (1 << 7), 18, 27) | __gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) | 0; @@ -4530,7 +4530,7 @@ GEN8_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->SmoothPointEnable, 13, 13) | __gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) | __gen_field(values->PointWidthSource, 11, 11) | - __gen_field(values->PointWidth, 0, 10) | + __gen_field(values->PointWidth * (1 << 3), 0, 10) | 0; } @@ -8245,7 +8245,7 @@ struct GEN8_RENDER_SURFACE_STATE { uint32_t CubeFaceEnablePositiveX; uint32_t CubeFaceEnableNegativeX; struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - uint32_t BaseMipLevel; + float BaseMipLevel; uint32_t SurfaceQPitch; uint32_t Height; uint32_t Width; @@ -8292,7 +8292,7 @@ struct GEN8_RENDER_SURFACE_STATE { uint32_t ShaderChannelSelectGreen; uint32_t ShaderChannelSelectBlue; uint32_t ShaderChannelSelectAlpha; - uint32_t ResourceMinLOD; + float ResourceMinLOD; __gen_address_type SurfaceBaseAddress; uint32_t XOffsetforVPlane; uint32_t YOffsetforVPlane; @@ -8330,7 +8330,7 @@ GEN8_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); dw[1] = __gen_field(dw_MemoryObjectControlState, 24, 30) | - __gen_field(values->BaseMipLevel, 19, 23) | + __gen_field(values->BaseMipLevel * (1 << 1), 19, 23) | __gen_field(values->SurfaceQPitch, 0, 14) | 0; @@ -8380,7 +8380,7 @@ GEN8_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->ShaderChannelSelectGreen, 22, 24) | __gen_field(values->ShaderChannelSelectBlue, 19, 21) | __gen_field(values->ShaderChannelSelectAlpha, 16, 18) | - __gen_field(values->ResourceMinLOD, 0, 11) | + __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) | 0; uint32_t dw8 = @@ -8428,7 +8428,7 @@ struct GEN8_SAMPLER_STATE { #define CLAMP_NONE 0 #define CLAMP_OGL 2 uint32_t LODPreClampMode; - uint32_t BaseMipLevel; + float BaseMipLevel; #define MIPFILTER_NONE 0 #define MIPFILTER_NEAREST 1 #define MIPFILTER_LINEAR 3 @@ -8447,8 +8447,8 @@ struct GEN8_SAMPLER_STATE { #define LEGACY 0 #define EWAApproximation 1 uint32_t AnisotropicAlgorithm; - uint32_t MinLOD; - uint32_t MaxLOD; + float MinLOD; + float MaxLOD; uint32_t ChromaKeyEnable; uint32_t ChromaKeyIndex; #define KEYFILTER_KILL_ON_ANY_MATCH 0 @@ -8506,7 +8506,7 @@ GEN8_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->SamplerDisable, 31, 31) | __gen_field(values->TextureBorderColorMode, 29, 29) | __gen_field(values->LODPreClampMode, 27, 28) | - __gen_field(values->BaseMipLevel, 22, 26) | + __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) | __gen_field(values->MipModeFilter, 20, 21) | __gen_field(values->MagModeFilter, 17, 19) | __gen_field(values->MinModeFilter, 14, 16) | @@ -8515,8 +8515,8 @@ GEN8_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, 0; dw[1] = - __gen_field(values->MinLOD, 20, 31) | - __gen_field(values->MaxLOD, 8, 19) | + __gen_field(values->MinLOD * (1 << 8), 20, 31) | + __gen_field(values->MaxLOD * (1 << 8), 8, 19) | __gen_field(values->ChromaKeyEnable, 7, 7) | __gen_field(values->ChromaKeyIndex, 5, 6) | __gen_field(values->ChromaKeyMode, 4, 4) | diff --git a/src/vulkan/image.c b/src/vulkan/image.c index b385be48917..b8a15a1aa59 100644 --- a/src/vulkan/image.c +++ b/src/vulkan/image.c @@ -261,7 +261,7 @@ anv_image_view_init(struct anv_surface_view *view, .SamplerL2BypassModeDisable = true, .RenderCacheReadWriteMode = WriteOnlyCache, .MemoryObjectControlState = GEN8_MOCS, - .BaseMipLevel = 0, + .BaseMipLevel = 0.0, .SurfaceQPitch = 0, .Height = image->extent.height - 1, .Width = image->extent.width - 1, @@ -282,7 +282,7 @@ anv_image_view_init(struct anv_surface_view *view, .ShaderChannelSelectGreen = vk_to_gen_swizzle[pCreateInfo->channels.g], .ShaderChannelSelectBlue = vk_to_gen_swizzle[pCreateInfo->channels.b], .ShaderChannelSelectAlpha = vk_to_gen_swizzle[pCreateInfo->channels.a], - .ResourceMinLOD = 0, + .ResourceMinLOD = 0.0, .SurfaceBaseAddress = { NULL, view->offset }, }; @@ -360,7 +360,7 @@ anv_color_attachment_view_init(struct anv_surface_view *view, .SamplerL2BypassModeDisable = true, .RenderCacheReadWriteMode = WriteOnlyCache, .MemoryObjectControlState = GEN8_MOCS, - .BaseMipLevel = 0, + .BaseMipLevel = 0.0, .SurfaceQPitch = 0, .Height = image->extent.height - 1, .Width = image->extent.width - 1, @@ -381,7 +381,7 @@ anv_color_attachment_view_init(struct anv_surface_view *view, .ShaderChannelSelectGreen = SCS_GREEN, .ShaderChannelSelectBlue = SCS_BLUE, .ShaderChannelSelectAlpha = SCS_ALPHA, - .ResourceMinLOD = 0, + .ResourceMinLOD = 0.0, .SurfaceBaseAddress = { NULL, view->offset }, }; |