aboutsummaryrefslogtreecommitdiffstats
path: root/src/compute-renderpass.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2022-09-08 23:04:06 +0200
committerladevieq <ladevie.quentin@gmail.com>2022-09-08 23:04:06 +0200
commit2d16fbd7e235bf2cc96d451469d8d39cae1917c3 (patch)
treeab565ca756c6341ec36f91835d548cfd989b6e1f /src/compute-renderpass.cpp
parentb7c2511e588f1da63413a38a624fd3e6bb8cf54d (diff)
First render using new texture uploading system
Diffstat (limited to 'src/compute-renderpass.cpp')
-rw-r--r--src/compute-renderpass.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compute-renderpass.cpp b/src/compute-renderpass.cpp
index 9a1d43e..d5dbaa0 100644
--- a/src/compute-renderpass.cpp
+++ b/src/compute-renderpass.cpp
@@ -19,7 +19,7 @@ void ComputeRenderpass::set_pipeline(const char* shader_name) {
void ComputeRenderpass::set_ouput_texture(Texture* out_texture) {
this->output_texture = out_texture;
- auto image = api.get_image(output_texture->device_image);
+ const auto& image = api.get_image(output_texture->device_image);
// TODO: Remove hardcoded offset
memcpy(constants + 56, &image.bindless_storage_index, sizeof(bindless_index));
@@ -36,7 +36,7 @@ void ComputeRenderpass::set_constant(off_t offset, uint64_t* constant) {
}
void ComputeRenderpass::set_constant(off_t offset, Texture* texture) {
- auto image = api.get_image(texture->device_image);
+ const auto& image = api.get_image(texture->device_image);
memcpy(constants + offset, (void*)&image.bindless_storage_index, sizeof(bindless_index));