Loading...
Searching...
No Matches
vkd3d_shader_preprocess_info Struct Reference

A chained structure containing preprocessing parameters. More...

`#include <vkd3d_shader.h>`

Collaboration diagram for vkd3d_shader_preprocess_info:
[legend]

## Data Fields

enum vkd3d_shader_structure_type | type
| Must be set to VKD3D_SHADER_STRUCTURE_TYPE_PREPROCESS_INFO.
const void * | next
| Optional pointer to a structure containing further parameters.
const struct vkd3d_shader_macro * | macros
| Pointer to an array of predefined macros.
unsigned int | macro_count
| Size, in elements, of macros.
PFN_vkd3d_shader_open_include | pfn_open_include
| Optional pointer to a callback function, which will be called in order to evaluate #include directives.
PFN_vkd3d_shader_close_include | pfn_close_include
| Optional pointer to a callback function, which will be called whenever an included file is closed.
void * | include_context
| User-defined pointer which will be passed unmodified to the pfn_open_include and pfn_close_include callbacks.

## Detailed Description

A chained structure containing preprocessing parameters.

This structure is optional.

This structure extends vkd3d_shader_compile_info.

This structure contains only input parameters.

Since
  1.3

## Field Documentation

## macros

const struct vkd3d_shader_macro* vkd3d_shader_preprocess_info::macros

Pointer to an array of predefined macros.

Each macro in this array will be expanded as if a corresponding #define statement were prepended to the source code.

If the same macro is specified multiple times, only the last value is used.

## pfn_close_include

PFN_vkd3d_shader_close_include vkd3d_shader_preprocess_info::pfn_close_include

Optional pointer to a callback function, which will be called whenever an included file is closed.

This function will be called exactly once for each successful call to pfn_open_include, and should be used to free any resources allocated thereby.

If this field is set to NULL, the pfn_open_include field must also be set to NULL.

## pfn_open_include

PFN_vkd3d_shader_open_include vkd3d_shader_preprocess_info::pfn_open_include

Optional pointer to a callback function, which will be called in order to evaluate #include directives.

The function receives parameters corresponding to the directive's arguments, and should return the complete text of the included file.

If this field is set to NULL, or if this structure is omitted, vkd3d-shader will attempt to open included files using POSIX file APIs.

If this field is set to NULL, the pfn_close_include field must also be set to NULL.

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

- include/vkd3d_shader.h