improving push constants support, fixing image resolving, lots of rasterizer fixes
Build / build (push) Failing after 0s
Test / build_and_test (push) Failing after 0s

This commit is contained in:
2026-06-28 13:26:15 +02:00
parent b13a256eb6
commit 7c6e0dc2a8
17 changed files with 547 additions and 97 deletions
+15 -9
View File
@@ -1152,16 +1152,22 @@ pub fn pushConstants(interface: *Interface, stages: vk.ShaderStageFlags, offset:
pub fn execute(context: *anyopaque, device: *ExecutionDevice) VkError!void {
const impl: *Impl = @ptrCast(@alignCast(context));
const state = &device.pipeline_states[
if (impl.stages.vertex_bit or impl.stages.fragment_bit)
ExecutionDevice.GRAPHICS_PIPELINE_STATE
else
ExecutionDevice.COMPUTE_PIPELINE_STATE
];
const size = @min(lib.PUSH_CONSTANT_SIZE - impl.offset, impl.blob.len);
@memcpy(state.push_constant_blob[impl.offset .. impl.offset + size], impl.blob[0..size]);
if (impl.stages.vertex_bit or
impl.stages.tessellation_control_bit or
impl.stages.tessellation_evaluation_bit or
impl.stages.geometry_bit or
impl.stages.fragment_bit)
{
const state = &device.pipeline_states[ExecutionDevice.GRAPHICS_PIPELINE_STATE];
@memcpy(state.push_constant_blob[impl.offset .. impl.offset + size], impl.blob[0..size]);
}
if (impl.stages.compute_bit) {
const state = &device.pipeline_states[ExecutionDevice.COMPUTE_PIPELINE_STATE];
@memcpy(state.push_constant_blob[impl.offset .. impl.offset + size], impl.blob[0..size]);
}
}
};