Loading...
Searching...
No Matches
vkd3d_shader_scan_signature_info Struct Reference

A chained structure containing descriptions of shader inputs and outputs. More...

`#include <vkd3d_shader.h>`

Collaboration diagram for vkd3d_shader_scan_signature_info:
[legend]

## Data Fields

enum vkd3d_shader_structure_type | type
| Must be set to VKD3D_SHADER_STRUCTURE_TYPE_SCAN_SIGNATURE_INFO.
const void * | next
| Optional pointer to a structure containing further parameters.
struct vkd3d_shader_signature | input
| The shader input varyings.
struct vkd3d_shader_signature | output
| The shader output varyings.
struct vkd3d_shader_signature | patch_constant
| The shader patch constant varyings.

## Detailed Description

A chained structure containing descriptions of shader inputs and outputs.

This structure is currently implemented only for DXBC and legacy D3D bytecode source types. For DXBC shaders, the returned information is parsed directly from the signatures embedded in the DXBC shader. For legacy D3D shaders, the returned information is synthesized based on registers declared or used by shader instructions. For all other shader types, the structure is zeroed.

All members (except for type and next) are output-only.

This structure is passed to vkd3d_shader_scan() and extends vkd3d_shader_compile_info.

Members of this structure are allocated by vkd3d-shader and should be freed with vkd3d_shader_free_scan_signature_info() when no longer needed.

All signatures may contain pointers into the input shader, and should only be accessed while the input shader remains valid.

Signature elements are synthesized from legacy Direct3D bytecode as follows:

- The vkd3d_shader_signature_element::semantic_name field is set to an uppercase string corresponding to the HLSL name for the usage, e.g. "POSITION", "BLENDWEIGHT", "COLOR", "PSIZE", etc.
- The vkd3d_shader_signature_element::semantic_index field is set to the usage index.
- The vkd3d_shader_signature_element::stream_index is always 0.

Signature elements are synthesized for any input or output register declared or used in a legacy Direct3D bytecode shader, including the following:

- Shader model 1 and 2 colour and texture coordinate registers.
- The shader model 1 pixel shader output register.
- Shader model 1 and 2 vertex shader output registers (position, fog, and point size).
- Shader model 3 pixel shader system value input registers (pixel position and face).

Since
  1.9

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

- include/vkd3d_shader.h