vulkan-2.0.0.1: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.Shader

Synopsis

Documentation

newtype VkShaderModuleCreateFlags Source #

VkShaderModuleCreateFlags - Reserved for future use

Description

VkShaderModuleCreateFlags is a bitmask type for setting a mask, but is currently reserved for future use.

See Also

VkShaderModuleCreateInfo

Instances
Eq VkShaderModuleCreateFlags Source # 
Instance details
Ord VkShaderModuleCreateFlags Source # 
Instance details
Read VkShaderModuleCreateFlags Source # 
Instance details
Show VkShaderModuleCreateFlags Source # 
Instance details
Storable VkShaderModuleCreateFlags Source # 
Instance details
Bits VkShaderModuleCreateFlags Source # 
Instance details

Methods

(.&.) :: VkShaderModuleCreateFlags -> VkShaderModuleCreateFlags -> VkShaderModuleCreateFlags #

(.|.) :: VkShaderModuleCreateFlags -> VkShaderModuleCreateFlags -> VkShaderModuleCreateFlags #

xor :: VkShaderModuleCreateFlags -> VkShaderModuleCreateFlags -> VkShaderModuleCreateFlags #

complement :: VkShaderModuleCreateFlags -> VkShaderModuleCreateFlags #

shift :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

rotate :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

zeroBits :: VkShaderModuleCreateFlags #

bit :: Int -> VkShaderModuleCreateFlags #

setBit :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

clearBit :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

complementBit :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

testBit :: VkShaderModuleCreateFlags -> Int -> Bool #

bitSizeMaybe :: VkShaderModuleCreateFlags -> Maybe Int #

bitSize :: VkShaderModuleCreateFlags -> Int #

isSigned :: VkShaderModuleCreateFlags -> Bool #

shiftL :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

unsafeShiftL :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

shiftR :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

unsafeShiftR :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

rotateL :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

rotateR :: VkShaderModuleCreateFlags -> Int -> VkShaderModuleCreateFlags #

popCount :: VkShaderModuleCreateFlags -> Int #

FiniteBits VkShaderModuleCreateFlags Source # 
Instance details

type VkShaderModule = Ptr VkShaderModule_T Source #

VkShaderModule - Opaque handle to a shader module object

See Also

VkPipelineShaderStageCreateInfo, vkCreateShaderModule, vkDestroyShaderModule

vkCreateShaderModule :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkShaderModuleCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pShaderModule" ::: Ptr VkShaderModule) -> IO VkResult Source #

vkCreateShaderModule - Creates a new shader module object

Parameters

  • device is the logical device that creates the shader module.
  • pCreateInfo parameter is a pointer to an instance of the VkShaderModuleCreateInfo structure.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.
  • pShaderModule points to a VkShaderModule handle in which the resulting shader module object is returned.

Description

Once a shader module has been created, any entry points it contains can be used in pipeline shader stages as described in Compute Pipelines and Graphics Pipelines.

If the shader stage fails to compile VK_ERROR_INVALID_SHADER_NV will be generated and the compile log will be reported back to the application by {html_spec_relative}#VK_EXT_debug_report if enabled.

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • pCreateInfo must be a valid pointer to a valid VkShaderModuleCreateInfo structure
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
  • pShaderModule must be a valid pointer to a VkShaderModule handle

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY
  • VK_ERROR_INVALID_SHADER_NV

See Also

VkAllocationCallbacks, VkDevice, VkShaderModule, VkShaderModuleCreateInfo

vkDestroyShaderModule :: ("device" ::: VkDevice) -> ("shaderModule" ::: VkShaderModule) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #

vkDestroyShaderModule - Destroy a shader module module

Parameters

  • device is the logical device that destroys the shader module.
  • shaderModule is the handle of the shader module to destroy.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.

Description

A shader module can be destroyed while pipelines created using its shaders are still in use.

Valid Usage

  • If VkAllocationCallbacks were provided when shaderModule was created, a compatible set of callbacks must be provided here
  • If no VkAllocationCallbacks were provided when shaderModule was created, pAllocator must be NULL

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • If shaderModule is not VK_NULL_HANDLE, shaderModule must be a valid VkShaderModule handle
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
  • If shaderModule is a valid handle, it must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to shaderModule must be externally synchronized

See Also

VkAllocationCallbacks, VkDevice, VkShaderModule

data VkShaderModuleCreateInfo Source #

VkShaderModuleCreateInfo - Structure specifying parameters of a newly created shader module

Valid Usage

  • codeSize must be greater than 0
  • If pCode points to SPIR-V code, codeSize must be a multiple of 4
  • pCode must point to either valid SPIR-V code, formatted and packed as described by the Khronos SPIR-V Specification or valid GLSL code which must be written to the GL_KHR_vulkan_glsl extension specification
  • If pCode points to SPIR-V code, that code must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix
  • If pCode points to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification
  • pCode must declare the Shader capability for SPIR-V code
  • pCode must not declare any capability that is not supported by the API, as described by the Capabilities section of the SPIR-V Environment appendix
  • If pCode declares any of the capabilities listed as optional in the SPIR-V Environment appendix, the corresponding feature(s) must be enabled.

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO

See Also

VkShaderModuleCreateFlags, VkStructureType, vkCreateShaderModule

Constructors

VkShaderModuleCreateInfo 

Fields