From 26394b1d3c56ae4c66b6987856d8842ab1960303 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Wed, 11 Apr 2018 21:30:30 -0500 Subject: [PATCH] Add first_scissor to cmd_set_scissor --- ash/src/device.rs | 9 +++++++-- examples/src/bin/texture.rs | 2 +- examples/src/bin/triangle.rs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ash/src/device.rs b/ash/src/device.rs index 4b3857e..9de2172 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -685,10 +685,15 @@ pub trait DeviceV1_0 { .cmd_bind_pipeline(command_buffer, pipeline_bind_point, pipeline); } - unsafe fn cmd_set_scissor(&self, command_buffer: vk::CommandBuffer, scissors: &[vk::Rect2D]) { + unsafe fn cmd_set_scissor( + &self, + command_buffer: vk::CommandBuffer, + first_scissor: vk::uint32_t, + scissors: &[vk::Rect2D], + ) { self.fp_v1_0().cmd_set_scissor( command_buffer, - 0, + first_scissor, scissors.len() as vk::uint32_t, scissors.as_ptr(), ); diff --git a/examples/src/bin/texture.rs b/examples/src/bin/texture.rs index 86b0172..8425272 100644 --- a/examples/src/bin/texture.rs +++ b/examples/src/bin/texture.rs @@ -910,7 +910,7 @@ fn main() { vk::PipelineBindPoint::Graphics, graphic_pipeline); device.cmd_set_viewport(draw_command_buffer, 0, &viewports); - device.cmd_set_scissor(draw_command_buffer, &scissors); + device.cmd_set_scissor(draw_command_buffer, 0, &scissors); device .cmd_bind_vertex_buffers(draw_command_buffer, 0, &[vertex_input_buffer], &[0]); device.cmd_bind_index_buffer(draw_command_buffer, diff --git a/examples/src/bin/triangle.rs b/examples/src/bin/triangle.rs index 35e3924..e05837d 100644 --- a/examples/src/bin/triangle.rs +++ b/examples/src/bin/triangle.rs @@ -510,7 +510,7 @@ fn main() { graphic_pipeline, ); device.cmd_set_viewport(draw_command_buffer, 0, &viewports); - device.cmd_set_scissor(draw_command_buffer, &scissors); + device.cmd_set_scissor(draw_command_buffer, 0, &scissors); device.cmd_bind_vertex_buffers( draw_command_buffer, 0,