anv: use common interfaces for shader modules

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508>
This commit is contained in:
Mike Blumenkrantz
2021-03-10 17:50:15 -05:00
committed by Marge Bot
parent 71b17149e8
commit f4a8912dc2
3 changed files with 9 additions and 64 deletions

View File

@@ -67,6 +67,7 @@
#include "vk_device.h"
#include "vk_instance.h"
#include "vk_physical_device.h"
#include "vk_shader_module.h"
/* Pre-declarations needed for WSI entrypoints */
struct wl_surface;
@@ -3215,14 +3216,6 @@ struct anv_semaphore {
void anv_semaphore_reset_temporary(struct anv_device *device,
struct anv_semaphore *semaphore);
struct anv_shader_module {
struct vk_object_base base;
unsigned char sha1[20];
uint32_t size;
char data[0];
};
static inline gl_shader_stage
vk_to_mesa_shader_stage(VkShaderStageFlagBits vk_stage)
{
@@ -3494,7 +3487,7 @@ VkResult
anv_pipeline_compile_cs(struct anv_compute_pipeline *pipeline,
struct anv_pipeline_cache *cache,
const VkComputePipelineCreateInfo *info,
const struct anv_shader_module *module,
const struct vk_shader_module *module,
const char *entrypoint,
const VkSpecializationInfo *spec_info);
@@ -4527,8 +4520,6 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(anv_sampler, base, VkSampler,
VK_OBJECT_TYPE_SAMPLER)
VK_DEFINE_NONDISP_HANDLE_CASTS(anv_semaphore, base, VkSemaphore,
VK_OBJECT_TYPE_SEMAPHORE)
VK_DEFINE_NONDISP_HANDLE_CASTS(anv_shader_module, base, VkShaderModule,
VK_OBJECT_TYPE_SHADER_MODULE)
VK_DEFINE_NONDISP_HANDLE_CASTS(anv_ycbcr_conversion, base,
VkSamplerYcbcrConversion,
VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION)