From 5a67df2546a4552cf7b9b401e5e3960ea55bf14f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 18 Jan 2016 10:36:53 -0800 Subject: [PATCH] anv/pack: Make TextureLODBias a proper 4.8 float XXX: We need to update the generators so this doesn't get stompped. --- src/vulkan/gen75_pack.h | 4 ++-- src/vulkan/gen7_pack.h | 4 ++-- src/vulkan/gen8_pack.h | 4 ++-- src/vulkan/gen9_pack.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vulkan/gen75_pack.h b/src/vulkan/gen75_pack.h index 3ed685bed0c..3d336848592 100644 --- a/src/vulkan/gen75_pack.h +++ b/src/vulkan/gen75_pack.h @@ -7984,7 +7984,7 @@ struct GEN75_SAMPLER_STATE { #define MAPFILTER_ANISOTROPIC 2 #define MAPFILTER_MONO 6 uint32_t MinModeFilter; - uint32_t TextureLODBias; + float TextureLODBias; #define LEGACY 0 #define EWAApproximation 1 uint32_t AnisotropicAlgorithm; @@ -8048,7 +8048,7 @@ GEN75_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->MipModeFilter, 20, 21) | __gen_field(values->MagModeFilter, 17, 19) | __gen_field(values->MinModeFilter, 14, 16) | - __gen_field(values->TextureLODBias, 1, 13) | + __gen_field(values->TextureLODBias * (1 << 8), 1, 13) | __gen_field(values->AnisotropicAlgorithm, 0, 0) | 0; diff --git a/src/vulkan/gen7_pack.h b/src/vulkan/gen7_pack.h index 5f2dbc470ec..0fe13de89df 100644 --- a/src/vulkan/gen7_pack.h +++ b/src/vulkan/gen7_pack.h @@ -6567,7 +6567,7 @@ struct GEN7_SAMPLER_STATE { #define MAPFILTER_ANISOTROPIC 2 #define MAPFILTER_MONO 6 uint32_t MinModeFilter; - uint32_t TextureLODBias; + float TextureLODBias; #define LEGACY 0 #define EWAApproximation 1 uint32_t AnisotropicAlgorithm; @@ -6630,7 +6630,7 @@ GEN7_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->MipModeFilter, 20, 21) | __gen_field(values->MagModeFilter, 17, 19) | __gen_field(values->MinModeFilter, 14, 16) | - __gen_field(values->TextureLODBias, 1, 13) | + __gen_field(values->TextureLODBias * (1 << 8), 1, 13) | __gen_field(values->AnisotropicAlgorithm, 0, 0) | 0; diff --git a/src/vulkan/gen8_pack.h b/src/vulkan/gen8_pack.h index 4d6b7c0a04d..0d77b68a9c5 100644 --- a/src/vulkan/gen8_pack.h +++ b/src/vulkan/gen8_pack.h @@ -8599,7 +8599,7 @@ struct GEN8_SAMPLER_STATE { #define MAPFILTER_ANISOTROPIC 2 #define MAPFILTER_MONO 6 uint32_t MinModeFilter; - uint32_t TextureLODBias; + float TextureLODBias; #define LEGACY 0 #define EWAApproximation 1 uint32_t AnisotropicAlgorithm; @@ -8666,7 +8666,7 @@ GEN8_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->MipModeFilter, 20, 21) | __gen_field(values->MagModeFilter, 17, 19) | __gen_field(values->MinModeFilter, 14, 16) | - __gen_field(values->TextureLODBias, 1, 13) | + __gen_field(values->TextureLODBias * (1 << 8), 1, 13) | __gen_field(values->AnisotropicAlgorithm, 0, 0) | 0; diff --git a/src/vulkan/gen9_pack.h b/src/vulkan/gen9_pack.h index b9dc30ad01b..fabcd7bb1e7 100644 --- a/src/vulkan/gen9_pack.h +++ b/src/vulkan/gen9_pack.h @@ -9159,7 +9159,7 @@ struct GEN9_SAMPLER_STATE { #define MAPFILTER_ANISOTROPIC 2 #define MAPFILTER_MONO 6 uint32_t MinModeFilter; - uint32_t TextureLODBias; + float TextureLODBias; #define LEGACY 0 #define EWAApproximation 1 uint32_t AnisotropicAlgorithm; @@ -9232,7 +9232,7 @@ GEN9_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, __gen_field(values->MipModeFilter, 20, 21) | __gen_field(values->MagModeFilter, 17, 19) | __gen_field(values->MinModeFilter, 14, 16) | - __gen_field(values->TextureLODBias, 1, 13) | + __gen_field(values->TextureLODBias * (1 << 8), 1, 13) | __gen_field(values->AnisotropicAlgorithm, 0, 0) | 0; -- 2.30.2