anv/pack: Make TextureLODBias a proper 4.8 float
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Jan 2016 18:36:53 +0000 (10:36 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 18 Jan 2016 18:36:53 +0000 (10:36 -0800)
XXX: We need to update the generators so this doesn't get stompped.

src/vulkan/gen75_pack.h
src/vulkan/gen7_pack.h
src/vulkan/gen8_pack.h
src/vulkan/gen9_pack.h

index 3ed685bed0c32684fe3646ff295317203c987817..3d336848592d8bf93978b6bf3b6845b69e5b17c4 100644 (file)
@@ -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;
 
index 5f2dbc470ec406015efd6f0d89c4e85c888119ca..0fe13de89dfaef4096a24e12a62f9c0e342d8720 100644 (file)
@@ -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;
 
index 4d6b7c0a04dd96d513f2e46d4ccbd47dfada041d..0d77b68a9c5f22a6da697148d1b8ed5527771096 100644 (file)
@@ -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;
 
index b9dc30ad01b640d06bcf79cc26941bbf363b7b23..fabcd7bb1e7e6494f8b982aa0dcd5fda2f34608e 100644 (file)
@@ -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;