gpu: update defaults/optionality for ColorTargetState/VertexState
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
e1a0c6dee6
commit
937d0120a3
3 changed files with 9 additions and 7 deletions
|
|
@ -35,7 +35,7 @@ pub const ExternalTextureDescriptor = extern struct {
|
||||||
plane0: TextureView,
|
plane0: TextureView,
|
||||||
plane1: ?TextureView,
|
plane1: ?TextureView,
|
||||||
do_yuv_to_rgb_conversion_only: bool,
|
do_yuv_to_rgb_conversion_only: bool,
|
||||||
yuv_to_rgb_conversion_matrix: ?[*]const f32 = null, // nullable
|
yuv_to_rgb_conversion_matrix: ?[*]const f32 = null,
|
||||||
src_transform_function_parameters: [*]const f32,
|
src_transform_function_parameters: [*]const f32,
|
||||||
dst_transform_function_parameters: [*]const f32,
|
dst_transform_function_parameters: [*]const f32,
|
||||||
gamut_conversion_matrix: [*]const f32,
|
gamut_conversion_matrix: [*]const f32,
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ pub const RenderPassDescriptor = extern struct {
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
color_attachment_count: u32,
|
color_attachment_count: u32,
|
||||||
color_attachments: [*]const types.RenderPassColorAttachment,
|
color_attachments: [*]const types.RenderPassColorAttachment,
|
||||||
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment = null, // nullable
|
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment = null,
|
||||||
occlusion_query_set: ?query_set.QuerySet,
|
occlusion_query_set: ?query_set.QuerySet,
|
||||||
timestamp_write_count: u32,
|
timestamp_write_count: u32,
|
||||||
timestamp_writes: [*]const RenderPassTimestampWrite,
|
timestamp_writes: [*]const RenderPassTimestampWrite,
|
||||||
|
|
|
||||||
|
|
@ -610,8 +610,8 @@ pub const VertexBufferLayout = extern struct {
|
||||||
pub const ColorTargetState = extern struct {
|
pub const ColorTargetState = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
format: TextureFormat,
|
format: TextureFormat,
|
||||||
blend: ?*const BlendState = null,
|
blend: ?*const BlendState,
|
||||||
write_mask: ColorWriteMaskFlags,
|
write_mask: ColorWriteMaskFlags = ColorWriteMaskFlags.all,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const VertexState = extern struct {
|
pub const VertexState = extern struct {
|
||||||
|
|
@ -628,10 +628,12 @@ pub const FragmentState = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
module: ShaderModule,
|
module: ShaderModule,
|
||||||
entry_point: [*:0]const u8,
|
entry_point: [*:0]const u8,
|
||||||
constant_count: u32,
|
constant_count: u32 = 0,
|
||||||
constants: [*]const ConstantEntry,
|
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
|
||||||
|
constants: ?[*]const ConstantEntry = null,
|
||||||
target_count: u32,
|
target_count: u32,
|
||||||
targets: [*]const ColorTargetState,
|
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
|
||||||
|
targets: ?[*]const ColorTargetState,
|
||||||
};
|
};
|
||||||
|
|
||||||
test "BackendType name" {
|
test "BackendType name" {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue