mojoshader_vulkan_vkfuncs.h
author Martin Krošlák <kroslakma@gmail.com>
Thu, 23 Jul 2020 18:16:22 -0400
changeset 1299 02d36217591b
parent 1271 5a67d082c55f
permissions -rw-r--r--
Fix SM1 shaders on SPIR-V after TEX* opcodes changes: - Fix implicit input attribute on SPIR-V profile - Remove texcoord attribs from other TEX* opcodes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1271
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     1
/**
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     2
 * MojoShader; generate shader programs from bytecode of compiled
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     3
 *  Direct3D shaders.
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     4
 *
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     5
 * Please see the file LICENSE.txt in the source's root directory.
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     6
 *
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     7
 *  This file written by Ryan C. Gordon.
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     8
 */
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
     9
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    10
/*
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    11
 * vkInstance, created by global vkCreateInstance function
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    12
 */
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    13
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    14
#ifndef VULKAN_INSTANCE_FUNCTION
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    15
#define VULKAN_INSTANCE_FUNCTION(ext, ret, func, params)
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    16
#endif
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    17
VULKAN_INSTANCE_FUNCTION(void, vkGetPhysicalDeviceMemoryProperties, (VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties *pMemoryProperties))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    18
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    19
/*
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    20
 * vkDevice, created by a vkInstance
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    21
 */
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    22
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    23
#ifndef VULKAN_DEVICE_FUNCTION
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    24
#define VULKAN_DEVICE_FUNCTION(ext, ret, func, params)
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    25
#endif
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    26
VULKAN_DEVICE_FUNCTION(VkResult, vkAllocateMemory, (VkDevice device, const VkMemoryAllocateInfo *pAllocateInfo, const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMemory))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    27
VULKAN_DEVICE_FUNCTION(VkResult, vkBindBufferMemory, (VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    28
VULKAN_DEVICE_FUNCTION(VkResult, vkCreateBuffer, (VkDevice device, const VkBufferCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBuffer *pBuffer))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    29
VULKAN_DEVICE_FUNCTION(VkResult, vkCreateShaderModule, (VkDevice device, const VkShaderModuleCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkShaderModule *pShaderModule))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    30
VULKAN_DEVICE_FUNCTION(void, vkDestroyBuffer, (VkDevice device, VkBuffer buffer, const VkAllocationCallbacks *pAllocator))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    31
VULKAN_DEVICE_FUNCTION(void, vkDestroyShaderModule, (VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks *pAllocator))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    32
VULKAN_DEVICE_FUNCTION(void, vkFreeMemory, (VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks *pAllocator))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    33
VULKAN_DEVICE_FUNCTION(void, vkGetBufferMemoryRequirements, (VkDevice device, VkBuffer buffer, VkMemoryRequirements *pMemoryRequirements))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    34
VULKAN_DEVICE_FUNCTION(VkResult, vkMapMemory, (VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void **ppData))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    35
VULKAN_DEVICE_FUNCTION(void, vkUnmapMemory, (VkDevice device, VkDeviceMemory memory))
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    36
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    37
/*
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    38
 * Redefine these every time you include this header!
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    39
 */
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    40
#undef VULKAN_INSTANCE_FUNCTION
5a67d082c55f Add support for Vulkan rendering.
Evan Hemsley <evan@moonside.games>
parents:
diff changeset
    41
#undef VULKAN_DEVICE_FUNCTION