From fd746ea7a6ad257f5e15107ce35ff3dc009dc090 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Mon, 15 Mar 2021 13:23:02 +0100 Subject: [PATCH] name and comment magic constant Follow-up to review of PR #61. Signed-off-by: Elias Naur --- piet-gpu/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/piet-gpu/src/lib.rs b/piet-gpu/src/lib.rs index c0bf0d7..f53e511 100644 --- a/piet-gpu/src/lib.rs +++ b/piet-gpu/src/lib.rs @@ -222,8 +222,9 @@ impl Renderer { let state_buf = session.create_buffer(1 * 1024 * 1024, dev)?; let image_dev = session.create_image2d(WIDTH as u32, HEIGHT as u32, dev)?; - let mut config_buf_host = session.create_buffer(9*4, host)?; - let config_buf_dev = session.create_buffer(9*4, dev)?; + const CONFIG_SIZE: u64 = 9*4; // Size of Config in setup.h. + let mut config_buf_host = session.create_buffer(CONFIG_SIZE, host)?; + let config_buf_dev = session.create_buffer(CONFIG_SIZE, dev)?; // TODO: constants const PATH_SIZE: usize = 12;