radv: Set driver version to mesa version;
[mesa.git] / src / amd / vulkan / radv_device.c
index ab04473b01cb7df63e9264b4a78989248d8c8993..d1fd58d77b9081bfbb9e5f8173229b99ce316b73 100644 (file)
@@ -465,7 +465,6 @@ void radv_GetPhysicalDeviceFeatures(
                .shaderFloat64                            = true,
                .shaderInt64                              = false,
                .shaderInt16                              = false,
-               .alphaToOne                               = true,
                .variableMultisampleRate                  = false,
                .inheritedQueries                         = false,
        };
@@ -478,6 +477,28 @@ void radv_GetPhysicalDeviceFeatures2KHR(
        return radv_GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features);
 }
 
+static uint32_t radv_get_driver_version()
+{
+       const char *minor_string = strchr(VERSION, '.');
+       const char *patch_string = minor_string ? strchr(minor_string + 1, ','): NULL;
+       int major = atoi(VERSION);
+       int minor = minor_string ? atoi(minor_string + 1) : 0;
+       int patch = patch_string ? atoi(patch_string + 1) : 0;
+       if (strstr(VERSION, "devel")) {
+               if (patch == 0) {
+                       patch = 99;
+                       if (minor == 0) {
+                               minor = 99;
+                               --major;
+                       } else
+                               --minor;
+               } else
+                       --patch;
+       }
+       uint32_t version = VK_MAKE_VERSION(major, minor, patch);
+       return version;
+}
+
 void radv_GetPhysicalDeviceProperties(
        VkPhysicalDevice                            physicalDevice,
        VkPhysicalDeviceProperties*                 pProperties)
@@ -598,8 +619,8 @@ void radv_GetPhysicalDeviceProperties(
        };
 
        *pProperties = (VkPhysicalDeviceProperties) {
-               .apiVersion = VK_MAKE_VERSION(1, 0, 5),
-               .driverVersion = 1,
+               .apiVersion = VK_MAKE_VERSION(1, 0, 42),
+               .driverVersion = radv_get_driver_version(),
                .vendorID = 0x1002,
                .deviceID = pdevice->rad_info.pci_id,
                .deviceType = VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,
@@ -2404,7 +2425,7 @@ radv_initialise_ds_surface(struct radv_device *device,
                ds->db_stencil_info |= S_028044_TILE_MODE_INDEX(tile_mode_index);
        }
 
-       if (iview->image->htile.size && !level) {
+       if (iview->image->surface.htile_size && !level) {
                ds->db_z_info |= S_028040_TILE_SURFACE_ENABLE(1) |
                        S_028040_ALLOW_EXPCLEAR(1);
 
@@ -2427,7 +2448,7 @@ radv_initialise_ds_surface(struct radv_device *device,
                        ds->db_stencil_info |= S_028044_TILE_STENCIL_DISABLE(1);
 
                va = device->ws->buffer_get_va(iview->bo) + iview->image->offset +
-                    iview->image->htile.offset;
+                    iview->image->htile_offset;
                ds->db_htile_data_base = va >> 8;
                ds->db_htile_surface = S_028ABC_FULL_CACHE(1);
        } else {
@@ -2631,7 +2652,7 @@ radv_init_sampler(struct radv_device *device,
                             S_008F38_XY_MAG_FILTER(radv_tex_filter(pCreateInfo->magFilter, max_aniso)) |
                             S_008F38_XY_MIN_FILTER(radv_tex_filter(pCreateInfo->minFilter, max_aniso)) |
                             S_008F38_MIP_FILTER(radv_tex_mipfilter(pCreateInfo->mipmapMode)) |
-                            S_008F38_MIP_POINT_PRECLAMP(1) |
+                            S_008F38_MIP_POINT_PRECLAMP(0) |
                             S_008F38_DISABLE_LSB_CEIL(1) |
                             S_008F38_FILTER_PREC_FIX(1) |
                             S_008F38_ANISO_OVERRIDE(is_vi));