sysgpu: perform type casting required for zig upgrade to 0.14

I have verified that none of the type casting will be performed on values that are out of range of the destination. The values are all known at compile time and are very low (less than 10).
This commit is contained in:
Joshua Holmes 2024-10-08 15:50:41 -07:00 committed by Stephen Gutekanst
parent c9f13dc003
commit 5957dd55f3

View file

@ -111,9 +111,9 @@ pub const Instance = struct {
};
const instance_info = vk.InstanceCreateInfo{
.p_application_info = &application_info,
.enabled_layer_count = layers.len,
.enabled_layer_count = @intCast(layers.len),
.pp_enabled_layer_names = layers.slice().ptr,
.enabled_extension_count = extensions.len,
.enabled_extension_count = @intCast(extensions.len),
.pp_enabled_extension_names = extensions.slice().ptr,
};
const vk_instance = try vkb.createInstance(&instance_info, null);
@ -2243,7 +2243,7 @@ pub const RenderPipeline = struct {
var vk_pipeline: vk.Pipeline = undefined;
_ = try vkd.createGraphicsPipelines(vk_device, .null_handle, 1, &[_]vk.GraphicsPipelineCreateInfo{.{
.stage_count = stages.len,
.stage_count = @intCast(stages.len),
.p_stages = stages.slice().ptr,
.p_vertex_input_state = &vertex_input,
.p_input_assembly_state = &input_assembly,
@ -2925,7 +2925,7 @@ pub const StateTracker = struct {
src_stage_mask,
tracker.dst_stage_mask,
.{},
memory_barriers.len,
@intCast(memory_barriers.len),
&memory_barriers.buffer,
0,
null,