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,
|
||||
plane1: ?TextureView,
|
||||
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,
|
||||
dst_transform_function_parameters: [*]const f32,
|
||||
gamut_conversion_matrix: [*]const f32,
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ pub const RenderPassDescriptor = extern struct {
|
|||
label: ?[*:0]const u8 = null,
|
||||
color_attachment_count: u32,
|
||||
color_attachments: [*]const types.RenderPassColorAttachment,
|
||||
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment = null, // nullable
|
||||
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment = null,
|
||||
occlusion_query_set: ?query_set.QuerySet,
|
||||
timestamp_write_count: u32,
|
||||
timestamp_writes: [*]const RenderPassTimestampWrite,
|
||||
|
|
|
|||
|
|
@ -610,8 +610,8 @@ pub const VertexBufferLayout = extern struct {
|
|||
pub const ColorTargetState = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
format: TextureFormat,
|
||||
blend: ?*const BlendState = null,
|
||||
write_mask: ColorWriteMaskFlags,
|
||||
blend: ?*const BlendState,
|
||||
write_mask: ColorWriteMaskFlags = ColorWriteMaskFlags.all,
|
||||
};
|
||||
|
||||
pub const VertexState = extern struct {
|
||||
|
|
@ -628,10 +628,12 @@ pub const FragmentState = extern struct {
|
|||
next_in_chain: *const ChainedStruct,
|
||||
module: ShaderModule,
|
||||
entry_point: [*:0]const u8,
|
||||
constant_count: u32,
|
||||
constants: [*]const ConstantEntry,
|
||||
constant_count: u32 = 0,
|
||||
// TODO: file a bug on Dawn, this is not marked as nullable but in fact is.
|
||||
constants: ?[*]const ConstantEntry = null,
|
||||
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" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue