anv: rename layers entrypoints
Prefix everything with anv_ so it doesn't clash with other drivers if loaded in the same process. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26843>
This commit is contained in:

committed by
Marge Bot

parent
cb0af056bc
commit
82c08c4141
@@ -3083,17 +3083,23 @@ VkResult anv_CreateDevice(
|
|||||||
bool override_initial_entrypoints = true;
|
bool override_initial_entrypoints = true;
|
||||||
if (physical_device->instance->vk.app_info.app_name &&
|
if (physical_device->instance->vk.app_info.app_name &&
|
||||||
!strcmp(physical_device->instance->vk.app_info.app_name, "HITMAN3.exe")) {
|
!strcmp(physical_device->instance->vk.app_info.app_name, "HITMAN3.exe")) {
|
||||||
vk_device_dispatch_table_from_entrypoints(&dispatch_table, &hitman3_device_entrypoints, true);
|
vk_device_dispatch_table_from_entrypoints(&dispatch_table,
|
||||||
|
&anv_hitman3_device_entrypoints,
|
||||||
|
true);
|
||||||
override_initial_entrypoints = false;
|
override_initial_entrypoints = false;
|
||||||
}
|
}
|
||||||
if (physical_device->info.ver < 12 &&
|
if (physical_device->info.ver < 12 &&
|
||||||
physical_device->instance->vk.app_info.app_name &&
|
physical_device->instance->vk.app_info.app_name &&
|
||||||
!strcmp(physical_device->instance->vk.app_info.app_name, "DOOM 64")) {
|
!strcmp(physical_device->instance->vk.app_info.app_name, "DOOM 64")) {
|
||||||
vk_device_dispatch_table_from_entrypoints(&dispatch_table, &doom64_device_entrypoints, true);
|
vk_device_dispatch_table_from_entrypoints(&dispatch_table,
|
||||||
|
&anv_doom64_device_entrypoints,
|
||||||
|
true);
|
||||||
override_initial_entrypoints = false;
|
override_initial_entrypoints = false;
|
||||||
}
|
}
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
vk_device_dispatch_table_from_entrypoints(&dispatch_table, &android_device_entrypoints, true);
|
vk_device_dispatch_table_from_entrypoints(&dispatch_table,
|
||||||
|
&anv_android_device_entrypoints,
|
||||||
|
true);
|
||||||
override_initial_entrypoints = false;
|
override_initial_entrypoints = false;
|
||||||
#endif
|
#endif
|
||||||
vk_device_dispatch_table_from_entrypoints(&dispatch_table,
|
vk_device_dispatch_table_from_entrypoints(&dispatch_table,
|
||||||
|
@@ -23,11 +23,11 @@
|
|||||||
|
|
||||||
#include "anv_private.h"
|
#include "anv_private.h"
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL
|
VkResult anv_android_CreateImageView(
|
||||||
android_CreateImageView(VkDevice _device,
|
VkDevice _device,
|
||||||
const VkImageViewCreateInfo *pCreateInfo,
|
const VkImageViewCreateInfo* pCreateInfo,
|
||||||
const VkAllocationCallbacks *pAllocator,
|
const VkAllocationCallbacks* pAllocator,
|
||||||
VkImageView *pView)
|
VkImageView* pView)
|
||||||
{
|
{
|
||||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||||
const struct util_format_description *fmt =
|
const struct util_format_description *fmt =
|
||||||
|
@@ -49,17 +49,17 @@
|
|||||||
* so it preserves all compressed information, and this WA is not needed.
|
* so it preserves all compressed information, and this WA is not needed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VKAPI_ATTR void VKAPI_CALL
|
void anv_doom64_CmdPipelineBarrier(
|
||||||
doom64_CmdPipelineBarrier(VkCommandBuffer commandBuffer,
|
VkCommandBuffer commandBuffer,
|
||||||
VkPipelineStageFlags srcStageMask,
|
VkPipelineStageFlags srcStageMask,
|
||||||
VkPipelineStageFlags dstStageMask,
|
VkPipelineStageFlags dstStageMask,
|
||||||
VkDependencyFlags dependencyFlags,
|
VkDependencyFlags dependencyFlags,
|
||||||
uint32_t memoryBarrierCount,
|
uint32_t memoryBarrierCount,
|
||||||
const VkMemoryBarrier* pMemoryBarriers,
|
const VkMemoryBarrier* pMemoryBarriers,
|
||||||
uint32_t bufferMemoryBarrierCount,
|
uint32_t bufferMemoryBarrierCount,
|
||||||
const VkBufferMemoryBarrier* pBufferMemoryBarriers,
|
const VkBufferMemoryBarrier* pBufferMemoryBarriers,
|
||||||
uint32_t imageMemoryBarrierCount,
|
uint32_t imageMemoryBarrierCount,
|
||||||
const VkImageMemoryBarrier* pImageMemoryBarriers)
|
const VkImageMemoryBarrier* pImageMemoryBarriers)
|
||||||
{
|
{
|
||||||
ANV_FROM_HANDLE(anv_cmd_buffer, command_buffer, commandBuffer);
|
ANV_FROM_HANDLE(anv_cmd_buffer, command_buffer, commandBuffer);
|
||||||
assert(command_buffer && command_buffer->device);
|
assert(command_buffer && command_buffer->device);
|
||||||
@@ -93,9 +93,11 @@ doom64_CmdPipelineBarrier(VkCommandBuffer commandBuffer,
|
|||||||
pImageMemoryBarriers);
|
pImageMemoryBarriers);
|
||||||
}
|
}
|
||||||
|
|
||||||
VKAPI_ATTR VkResult VKAPI_CALL
|
VkResult anv_doom64_CreateImage(
|
||||||
doom64_CreateImage(VkDevice _device, const VkImageCreateInfo* pCreateInfo,
|
VkDevice _device,
|
||||||
const VkAllocationCallbacks* pAllocator, VkImage* pImage)
|
const VkImageCreateInfo* pCreateInfo,
|
||||||
|
const VkAllocationCallbacks* pAllocator,
|
||||||
|
VkImage* pImage)
|
||||||
{
|
{
|
||||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||||
assert(device);
|
assert(device);
|
||||||
@@ -111,9 +113,10 @@ doom64_CreateImage(VkDevice _device, const VkImageCreateInfo* pCreateInfo,
|
|||||||
return anv_CreateImage(_device, pCreateInfo, pAllocator, pImage);
|
return anv_CreateImage(_device, pCreateInfo, pAllocator, pImage);
|
||||||
}
|
}
|
||||||
|
|
||||||
VKAPI_ATTR void VKAPI_CALL
|
void anv_doom64_DestroyImage(
|
||||||
doom64_DestroyImage(VkDevice _device, VkImage _image,
|
VkDevice _device,
|
||||||
const VkAllocationCallbacks *pAllocator)
|
VkImage _image,
|
||||||
|
const VkAllocationCallbacks* pAllocator)
|
||||||
{
|
{
|
||||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||||
ANV_FROM_HANDLE(anv_image, image, _image);
|
ANV_FROM_HANDLE(anv_image, image, _image);
|
||||||
|
@@ -23,11 +23,11 @@
|
|||||||
|
|
||||||
#include "anv_private.h"
|
#include "anv_private.h"
|
||||||
|
|
||||||
VkResult
|
VkResult anv_hitman3_CreateBufferView(
|
||||||
hitman3_CreateBufferView(VkDevice _device,
|
VkDevice _device,
|
||||||
const VkBufferViewCreateInfo *pCreateInfo,
|
const VkBufferViewCreateInfo* pCreateInfo,
|
||||||
const VkAllocationCallbacks *pAllocator,
|
const VkAllocationCallbacks* pAllocator,
|
||||||
VkBufferView *pView)
|
VkBufferView* pView)
|
||||||
{
|
{
|
||||||
ANV_FROM_HANDLE(anv_buffer, buffer, pCreateInfo->buffer);
|
ANV_FROM_HANDLE(anv_buffer, buffer, pCreateInfo->buffer);
|
||||||
if (pCreateInfo->format == VK_FORMAT_R32G32B32_SFLOAT &&
|
if (pCreateInfo->format == VK_FORMAT_R32G32B32_SFLOAT &&
|
||||||
|
@@ -42,9 +42,9 @@ anv_entrypoints = custom_target(
|
|||||||
'--device-prefix', 'gfx12',
|
'--device-prefix', 'gfx12',
|
||||||
'--device-prefix', 'gfx125',
|
'--device-prefix', 'gfx125',
|
||||||
'--device-prefix', 'gfx20',
|
'--device-prefix', 'gfx20',
|
||||||
'--device-prefix', 'doom64',
|
'--device-prefix', 'anv_doom64',
|
||||||
'--device-prefix', 'hitman3',
|
'--device-prefix', 'anv_hitman3',
|
||||||
'--device-prefix', 'android'
|
'--device-prefix', 'anv_android',
|
||||||
],
|
],
|
||||||
depend_files : vk_entrypoints_gen_depend_files,
|
depend_files : vk_entrypoints_gen_depend_files,
|
||||||
)
|
)
|
||||||
@@ -145,9 +145,9 @@ libanv_files = files(
|
|||||||
'i915/anv_kmd_backend.c',
|
'i915/anv_kmd_backend.c',
|
||||||
'i915/anv_queue.c',
|
'i915/anv_queue.c',
|
||||||
'i915/anv_queue.h',
|
'i915/anv_queue.h',
|
||||||
|
'layers/anv_android_layer.c',
|
||||||
'layers/anv_doom64.c',
|
'layers/anv_doom64.c',
|
||||||
'layers/anv_hitman3.c',
|
'layers/anv_hitman3.c',
|
||||||
'layers/anv_android_layer.c',
|
|
||||||
'xe/anv_batch_chain.c',
|
'xe/anv_batch_chain.c',
|
||||||
'xe/anv_batch_chain.h',
|
'xe/anv_batch_chain.h',
|
||||||
'xe/anv_kmd_backend.c',
|
'xe/anv_kmd_backend.c',
|
||||||
|
Reference in New Issue
Block a user