vkd3d: vkd3d_shader_d3dbc_source_info Struct Reference

vkd3d 1.19 The vkd3d 3D Graphics Library

Loading...
Searching...
No Matches
vkd3d_shader_d3dbc_source_info Struct Reference

A chained structure containing legacy Direct3D bytecode compilation parameters. More...

`#include <vkd3d_shader.h>`

## Data Fields
enum vkd3d_shader_structure_type | type
| Must be set to VKD3D_SHADER_STRUCTURE_TYPE_D3DBC_SOURCE_INFO.
const void * | next
| Optional pointer to a structure containing further parameters.
enum vkd3d_shader_resource_type | texture_dimensions [6]
| The dimension of each texture bound to the shader.
uint32_t | shadow_samplers
| A mask indicating which samplers should be shadow (i.e.

## Detailed Description

A chained structure containing legacy Direct3D bytecode compilation parameters.

This structure specifies some information about the source environment that is not specified in the source shader format, but may be necessary for the target format.

This structure is optional.

This structure extends vkd3d_shader_compile_info.

This structure contains only input parameters.

Since
  1.18

## Field Documentation

## ◆ shadow_samplers

uint32_t vkd3d_shader_d3dbc_source_info::shadow_samplers

A mask indicating which samplers should be shadow (i.e.

comparison-mode) samplers. When legacy Direct3D shaders are used with the Direct3D 8 and 9 APIs, this is implied by the format of the sampled resource; e.g. a D3DFMT_D24S8 texture implies shadow sampling, while a D3DFMT_A8R8G8B8 or D3DFMT_INTZ texture does not. This information is necessary when converting to other formats (e.g. SPIR-V, GLSL) which specify this in the shader.

For example, if bit 1 is set (so the value is 0x2), this indicates that the sampler at bind point 1 (and no others) should be a shadow sampler.

Bits in this mask corresponding to textures not used by the shader will be ignored.

If this structure is not specified, no samplers will be considered to be shadow samplers.

## ◆ texture_dimensions

enum vkd3d_shader_resource_type vkd3d_shader_d3dbc_source_info::texture_dimensions[6]

The dimension of each texture bound to the shader.

If this structure is not specified, the dimension for all textures will be VKD3D_SHADER_RESOURCE_TEXTURE_2D.

The dimension of textures in this array not used by the shader will be ignored.

This field is ignored for shader models 2 and higher.

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

- include/vkd3d_shader.h