vkd3d  1.18
The vkd3d 3D Graphics Library
Data Fields
vkd3d_shader_code Struct Reference

A generic structure containing a GPU shader, in text or byte-code format. More...

#include <vkd3d_shader.h>

Data Fields

const void * code
 Pointer to the code. More...
 
size_t size
 Size of code, in bytes. More...
 

Detailed Description

A generic structure containing a GPU shader, in text or byte-code format.

Field Documentation

◆ code

const void* vkd3d_shader_code::code

Pointer to the code.

Note that textual formats are not null-terminated. Therefore size should not include a null terminator when this structure is passed as input to a vkd3d-shader function, and size will not include a null terminator when this structure is used as output.

For convenience, vkd3d_shader_preprocess() and vkd3d_shader_compile() will append a null terminator past the end of their output when outputting textual formats like VKD3D_SHADER_TARGET_D3D_ASM. This makes it safe to call functions like strlen() on code for such output, although doing so will obviously not account for any embedded null characters that may be present.

◆ size

size_t vkd3d_shader_code::size

Size of code, in bytes.


The documentation for this struct was generated from the following file: