mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
radv: remove radv_physical_device_cache_key
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41022>
This commit is contained in:
parent
27815719aa
commit
44b09b8396
4 changed files with 11 additions and 26 deletions
|
|
@ -864,13 +864,18 @@ capture_trace(VkQueue _queue)
|
|||
static void
|
||||
radv_device_init_cache_key(struct radv_device *device)
|
||||
{
|
||||
STATIC_ASSERT(sizeof(struct radv_device_cache_key) == 4);
|
||||
STATIC_ASSERT(sizeof(enum radeon_family) == 4);
|
||||
STATIC_ASSERT(sizeof(struct radv_device_cache_key) == 12);
|
||||
STATIC_ASSERT(sizeof(device->compiler_info.key) == 12);
|
||||
|
||||
const struct radv_physical_device *pdev = radv_device_physical(device);
|
||||
struct radv_device_cache_key *key = &device->cache_key;
|
||||
struct mesa_blake3 ctx;
|
||||
|
||||
key->family = pdev->info.family;
|
||||
key->ptr_size = sizeof(void *);
|
||||
key->conformant_trunc_coord = pdev->info.compiler_info.conformant_trunc_coord;
|
||||
|
||||
key->image_2d_view_of_3d = device->vk.enabled_features.image2DViewOf3D && pdev->info.gfx_level == GFX9;
|
||||
key->mesh_shader_queries = device->vk.enabled_features.meshShaderQueries && pdev->emulate_mesh_shader_queries;
|
||||
key->primitives_generated_query = radv_uses_primitives_generated_query(device);
|
||||
|
|
@ -889,7 +894,6 @@ radv_device_init_cache_key(struct radv_device *device)
|
|||
}
|
||||
|
||||
_mesa_blake3_init(&ctx);
|
||||
_mesa_blake3_update(&ctx, &pdev->cache_key, sizeof(pdev->cache_key));
|
||||
_mesa_blake3_update(&ctx, &device->cache_key, sizeof(device->cache_key));
|
||||
_mesa_blake3_update(&ctx, &device->compiler_info.key, sizeof(device->compiler_info.key));
|
||||
_mesa_blake3_final(&ctx, device->cache_hash);
|
||||
|
|
|
|||
|
|
@ -55,11 +55,15 @@ struct radv_layer_dispatch_tables {
|
|||
};
|
||||
|
||||
struct radv_device_cache_key {
|
||||
enum radeon_family family;
|
||||
uint32_t ptr_size;
|
||||
|
||||
uint32_t conformant_trunc_coord : 1;
|
||||
uint32_t image_2d_view_of_3d : 1;
|
||||
uint32_t mesh_shader_queries : 1;
|
||||
uint32_t primitives_generated_query : 1;
|
||||
|
||||
uint32_t reserved : 29;
|
||||
uint32_t reserved : 28;
|
||||
};
|
||||
|
||||
enum radv_force_vrs {
|
||||
|
|
|
|||
|
|
@ -288,19 +288,6 @@ parse_hex(char *out, const char *in, unsigned length)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
radv_physical_device_init_cache_key(struct radv_physical_device *pdev)
|
||||
{
|
||||
STATIC_ASSERT(sizeof(enum radeon_family) == 4);
|
||||
STATIC_ASSERT(sizeof(struct radv_physical_device_cache_key) == 12);
|
||||
|
||||
struct radv_physical_device_cache_key *key = &pdev->cache_key;
|
||||
|
||||
key->family = pdev->info.family;
|
||||
key->ptr_size = sizeof(void *);
|
||||
key->conformant_trunc_coord = pdev->info.compiler_info.conformant_trunc_coord;
|
||||
}
|
||||
|
||||
static int
|
||||
radv_device_get_cache_uuid(struct radv_physical_device *pdev, void *uuid)
|
||||
{
|
||||
|
|
@ -2660,8 +2647,6 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
|
|||
pdev->render_devid = render_stat.st_rdev;
|
||||
}
|
||||
|
||||
radv_physical_device_init_cache_key(pdev);
|
||||
|
||||
if (radv_device_get_cache_uuid(pdev, pdev->cache_uuid)) {
|
||||
result = vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED, "cannot generate UUID");
|
||||
goto fail_wsi;
|
||||
|
|
|
|||
|
|
@ -36,13 +36,6 @@ struct radv_binning_settings {
|
|||
unsigned fpovs_per_batch; /* allowed range: [0, 255], 0 = unlimited */
|
||||
};
|
||||
|
||||
struct radv_physical_device_cache_key {
|
||||
enum radeon_family family;
|
||||
uint32_t ptr_size;
|
||||
uint32_t conformant_trunc_coord : 1;
|
||||
uint32_t reserved : 31;
|
||||
};
|
||||
|
||||
enum radv_video_enc_hw_ver {
|
||||
RADV_VIDEO_ENC_HW_1_2,
|
||||
RADV_VIDEO_ENC_HW_2,
|
||||
|
|
@ -181,7 +174,6 @@ struct radv_physical_device {
|
|||
uint32_t encoder_interface_version;
|
||||
bool video_encode_enabled;
|
||||
bool video_decode_enabled;
|
||||
struct radv_physical_device_cache_key cache_key;
|
||||
|
||||
uint32_t tess_distribution_mode;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue