Skip to content

Commit

Permalink
Reverted ->renderpass_reference().value() to ->renderpass_reference()…
Browse files Browse the repository at this point in the history
… in the examples
  • Loading branch information
johannesugb committed Apr 12, 2024
1 parent f5d429f commit b10bb8c
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion auto_vk
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class compute_image_processing_app : public avk::invokee

auto submission = avk::context().record({
// Begin and end one renderpass:
avk::command::render_pass(mGraphicsPipeline->renderpass_reference().value(), avk::context().main_window()->current_backbuffer_reference(), {
avk::command::render_pass(mGraphicsPipeline->renderpass_reference(), avk::context().main_window()->current_backbuffer_reference(), {

// Draw left viewport:
avk::command::custom_commands([&,this](avk::command_buffer_t& cb) { // If there is no avk::command::... struct for a particular command, we can always use avk::command::custom_commands
Expand Down
2 changes: 1 addition & 1 deletion examples/framebuffer/source/framebuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class framebuffer_app : public avk::invokee

avk::context().record({
// Begin and end one renderpass:
avk::command::render_pass(mPipeline->renderpass_reference().value(), mOneFramebuffer.as_reference(), {
avk::command::render_pass(mPipeline->renderpass_reference(), mOneFramebuffer.as_reference(), {
// And within, bind a pipeline and perform an indexed draw call:
avk::command::bind_pipeline(mPipeline.as_reference()),
avk::command::draw_indexed(mIndexBuffer.as_reference(), mVertexBuffers[inFlightIndex].as_reference())
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world/source/hello_world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class draw_a_triangle_app : public avk::invokee

avk::context().record({
// Begin and end one renderpass:
avk::command::render_pass(mPipeline->renderpass_reference().value(), avk::context().main_window()->current_backbuffer_reference(), {
avk::command::render_pass(mPipeline->renderpass_reference(), avk::context().main_window()->current_backbuffer_reference(), {
// And within, bind a pipeline and draw three vertices:
avk::command::bind_pipeline(mPipeline.as_reference()),
avk::command::draw(3u, 1u, 0u, 0u)
Expand Down
2 changes: 1 addition & 1 deletion examples/model_loader/source/model_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class model_loader_app : public avk::invokee
auto cmdBfr = commandPool->alloc_command_buffer(vk::CommandBufferUsageFlagBits::eOneTimeSubmit);

avk::context().record({
avk::command::render_pass(mPipeline->renderpass_reference().value(), avk::context().main_window()->current_backbuffer_reference(), {
avk::command::render_pass(mPipeline->renderpass_reference(), avk::context().main_window()->current_backbuffer_reference(), {
avk::command::bind_pipeline(mPipeline.as_reference()),
avk::command::bind_descriptors(mPipeline->layout(), mDescriptorCache->get_or_create_descriptor_sets({
avk::descriptor_binding(0, 0, avk::as_combined_image_samplers(mImageSamplers, avk::layout::shader_read_only_optimal)),
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_queues/source/multiple_queues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class multiple_queues_app : public avk::invokee
sync::buffer_memory_barrier(mVertexBuffers[inFlightIndex][1].as_reference(), stage::none + access::none >> stage::vertex_attribute_input + access::vertex_attribute_read)
.with_queue_family_ownership_transfer(mTransferQueues[1]->family_index(), mGraphicsQueue->family_index()),

command::render_pass(mPipeline->renderpass_reference().value(), avk::context().main_window()->current_backbuffer_reference(), {
command::render_pass(mPipeline->renderpass_reference(), avk::context().main_window()->current_backbuffer_reference(), {
// And within, bind a pipeline and perform an indexed draw call:
command::bind_pipeline(mPipeline.as_reference()),
// Two draw calls with all the buffer ownerships now transferred to the graphics queue:
Expand Down
2 changes: 1 addition & 1 deletion examples/orca_loader/source/orca_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ class orca_loader_app : public avk::invokee
auto cmdBfr = commandPool->alloc_command_buffer(vk::CommandBufferUsageFlagBits::eOneTimeSubmit);

avk::context().record({
avk::command::render_pass(mPipeline->renderpass_reference().value(), avk::context().main_window()->current_backbuffer_reference(), {
avk::command::render_pass(mPipeline->renderpass_reference(), avk::context().main_window()->current_backbuffer_reference(), {
avk::command::bind_pipeline(mPipeline.as_reference()),
avk::command::bind_descriptors(mPipeline->layout(), mDescriptorCache->get_or_create_descriptor_sets({
avk::descriptor_binding(0, 5, mViewProjBuffers[ifi]),
Expand Down
2 changes: 1 addition & 1 deletion examples/skinned_meshlets/source/skinned_meshlets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ class skinned_meshlets_app : public avk::invokee
return mBoneMatricesBuffersAni[inFlightIndex][std::get<animated_model_data>(tpl).mBoneMatricesBufferIndex]->fill(std::get<additional_animated_model_data>(tpl).mBoneMatricesAni.data(), 0);
}),

command::render_pass(pipeline->renderpass_reference().value(), context().main_window()->current_backbuffer_reference(), {
command::render_pass(pipeline->renderpass_reference(), context().main_window()->current_backbuffer_reference(), {
command::bind_pipeline(pipeline.as_reference()),
command::bind_descriptors(pipeline->layout(), mDescriptorCache->get_or_create_descriptor_sets({
descriptor_binding(0, 0, as_combined_image_samplers(mImageSamplers, layout::shader_read_only_optimal)),
Expand Down
2 changes: 1 addition & 1 deletion examples/static_meshlets/source/static_meshlets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ mViewProjBuffers[inFlightIndex]->fill(glm::value_ptr(viewProjMat), 0),

sync::global_memory_barrier(stage::all_commands >> stage::all_commands, access::memory_write >> access::memory_write | access::memory_read),

command::render_pass(pipeline->renderpass_reference().value(), context().main_window()->current_backbuffer_reference(), {
command::render_pass(pipeline->renderpass_reference(), context().main_window()->current_backbuffer_reference(), {
command::bind_pipeline(pipeline.as_reference()),
command::bind_descriptors(pipeline->layout(), mDescriptorCache->get_or_create_descriptor_sets({
descriptor_binding(0, 0, as_combined_image_samplers(mImageSamplers, layout::shader_read_only_optimal)),
Expand Down
2 changes: 1 addition & 1 deletion examples/texture_cubemap/source/texture_cubemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class texture_cubemap_app : public avk::invokee

avk::context().record({
// Begin and end one renderpass:
avk::command::render_pass(mPipelineSkybox->renderpass_reference().value(), avk::context().main_window()->current_backbuffer_reference(), avk::command::gather(
avk::command::render_pass(mPipelineSkybox->renderpass_reference(), avk::context().main_window()->current_backbuffer_reference(), avk::command::gather(
// First, draw the skybox:
avk::command::bind_pipeline(mPipelineSkybox.as_reference()),
avk::command::bind_descriptors(mPipelineSkybox->layout(), mDescriptorCache->get_or_create_descriptor_sets({
Expand Down
2 changes: 1 addition & 1 deletion examples/vertex_buffers/source/vertex_buffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class vertex_buffers_app : public avk::invokee
// avk::sync::buffer_memory_barrier(mVertexBuffers[inFlightIndex].as_reference(), avk::stage::auto_stage >> avk::stage::vertex_attribute_input, avk::access:: auto_access >> avk::access::vertex_attribute_read),

// Begin and end one renderpass:
avk::command::render_pass(mPipeline->renderpass_reference().value(), avk::context().main_window()->current_backbuffer_reference(), {
avk::command::render_pass(mPipeline->renderpass_reference(), avk::context().main_window()->current_backbuffer_reference(), {
// And within, bind a pipeline and perform an indexed draw call:
avk::command::bind_pipeline(mPipeline.as_reference()),
avk::command::draw_indexed(mIndexBuffer.as_reference(), mVertexBuffers[inFlightIndex].as_reference())
Expand Down

0 comments on commit b10bb8c

Please sign in to comment.