Skip to content

Commit

Permalink
also use pointer for descriptor in `wgpu_command_encoder_begin_render…
Browse files Browse the repository at this point in the history
…_pass` for consistency reasons
  • Loading branch information
porky11 committed Jun 4, 2019
1 parent 0642509 commit 8abc1c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/hello_triangle_c/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ int main() {

WGPURenderPassId rpass =
wgpu_command_encoder_begin_render_pass(cmd_encoder,
(WGPURenderPassDescriptor){
&(WGPURenderPassDescriptor){
.color_attachments = color_attachments,
.color_attachments_length = RENDER_PASS_ATTACHMENTS_LENGTH,
.depth_stencil_attachment = NULL,
Expand Down
2 changes: 1 addition & 1 deletion ffi/wgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ WGPUComputePassId wgpu_command_encoder_begin_compute_pass(WGPUCommandEncoderId c

#if defined(WGPU_LOCAL)
WGPURenderPassId wgpu_command_encoder_begin_render_pass(WGPUCommandEncoderId command_encoder_id,
WGPURenderPassDescriptor desc);
const WGPURenderPassDescriptor *desc);
#endif

WGPUCommandBufferId wgpu_command_encoder_finish(WGPUCommandEncoderId command_encoder_id);
Expand Down
4 changes: 2 additions & 2 deletions wgpu-native/src/command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ pub extern "C" fn wgpu_command_encoder_finish(

pub fn command_encoder_begin_render_pass(
command_encoder_id: CommandEncoderId,
desc: RenderPassDescriptor,
desc: &RenderPassDescriptor,
) -> RenderPass<Backend> {
let device_guard = HUB.devices.read();
let mut cmb_guard = HUB.command_buffers.write();
Expand Down Expand Up @@ -406,7 +406,7 @@ pub fn command_encoder_begin_render_pass(
#[no_mangle]
pub extern "C" fn wgpu_command_encoder_begin_render_pass(
command_encoder_id: CommandEncoderId,
desc: RenderPassDescriptor,
desc: &RenderPassDescriptor,
) -> RenderPassId {
let pass = command_encoder_begin_render_pass(command_encoder_id, desc);
HUB.render_passes.register_local(pass)
Expand Down

0 comments on commit 8abc1c2

Please sign in to comment.