mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
The existing `per_stage_map` field of MSL backend options specifies resource binding maps that apply to all entry points of each stage type. It is useful to have the ability to provide a separate binding index map for each entry point, especially when the same shader module defines multiple entry points of the same stage kind. This patch replaces `per_stage_map` with a new `per_entry_point_map` option where resources are keyed by the entry-point function name.
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
(
|
|
god_mode: true,
|
|
hlsl: (
|
|
shader_model: V5_1,
|
|
binding_map: {
|
|
(group: 0, binding: 0): (space: 0, register: 0, binding_array_size: Some(10)),
|
|
(group: 0, binding: 1): (space: 1, register: 0),
|
|
(group: 0, binding: 2): (space: 2, register: 0),
|
|
(group: 0, binding: 3): (space: 3, register: 0),
|
|
(group: 0, binding: 4): (space: 4, register: 0),
|
|
(group: 0, binding: 5): (space: 5, register: 0),
|
|
(group: 0, binding: 6): (space: 6, register: 0),
|
|
(group: 0, binding: 7): (space: 7, register: 0),
|
|
(group: 0, binding: 8): (space: 8, register: 0),
|
|
},
|
|
fake_missing_bindings: true,
|
|
special_constants_binding: None,
|
|
zero_initialize_workgroup_memory: true,
|
|
),
|
|
msl: (
|
|
lang_version: (2, 0),
|
|
per_entry_point_map: {
|
|
"main": (
|
|
resources: {
|
|
(group: 0, binding: 0): (texture: Some(0), binding_array_size: Some(10), mutable: false),
|
|
},
|
|
sizes_buffer: None,
|
|
)
|
|
},
|
|
inline_samplers: [],
|
|
spirv_cross_compatibility: false,
|
|
fake_missing_bindings: true,
|
|
zero_initialize_workgroup_memory: true,
|
|
),
|
|
spv: (
|
|
version: (1, 1),
|
|
binding_map: {
|
|
(group: 0, binding: 0): (binding_array_size: Some(10)),
|
|
},
|
|
),
|
|
bounds_check_policies: (
|
|
index: ReadZeroSkipWrite,
|
|
buffer: ReadZeroSkipWrite,
|
|
image: ReadZeroSkipWrite,
|
|
)
|
|
)
|