From 13773ea16219d24d5f6f60e49453d0ee30821a9f Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 3 Apr 2020 16:13:15 -0400 Subject: [PATCH] Fix push constant ranges --- libportability-gfx/src/impls.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index 1199cfd..f33687e 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -2672,10 +2672,7 @@ pub extern "C" fn gfxCreatePipelineLayout( let ranges = push_constants.iter().map(|constant| { let stages = conv::map_stage_flags(constant.stageFlags); - let start = constant.offset / 4; - let size = constant.size / 4; - - (stages, start..start + size) + (stages, constant.offset..constant.offset + constant.size) }); let pipeline_layout = match unsafe { gpu.device.create_pipeline_layout(layouts, ranges) } {