diff options
| -rw-r--r-- | shaders/compute.comp | 2 | ||||
| -rw-r--r-- | src/main.cpp | 16 | ||||
| -rw-r--r-- | src/vk-renderer.cpp | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/shaders/compute.comp b/shaders/compute.comp index 633fa50..6f47408 100644 --- a/shaders/compute.comp +++ b/shaders/compute.comp @@ -46,7 +46,7 @@ struct camera { float[3] padding; }; -layout(set = 0, binding = 0) uniform Inputs { +layout(set = 0, binding = 0) buffer Inputs { vec4 sky_color; vec4 ground_color; camera cam; diff --git a/src/main.cpp b/src/main.cpp index 480d139..a9c7123 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -80,16 +80,14 @@ int main() { } // Image dimensions - const float aspect_ratio = 16.0 / 9.0; - const uint32_t width = 1920; + // const float aspect_ratio = 16.0 / 9.0; + const float aspect_ratio = 1; + const uint32_t width = 400; const uint32_t height = width / aspect_ratio; window wnd { width , height }; vkrenderer renderer { wnd }; - if(rdoc_api) rdoc_api->StartFrameCapture(NULL, NULL); - renderer.initialization_frame(); - const uint32_t samples_per_pixel = 1; const uint32_t max_depth = 1; @@ -133,15 +131,15 @@ int main() { random_scene(inputs.spheres); // PPM format header - std::cout << "P3\n" << width << '\n' << height << "\n255" << std::endl; + // std::cout << "P3\n" << width << '\n' << height << "\n255" << std::endl; - std::cerr << "Generating image" << std::endl; + // std::cerr << "Generating image" << std::endl; // To start a frame capture, call StartFrameCapture. // You can specify NULL, NULL for the device to capture on if you have only one device and // either no windows at all or only one window, and it will capture from that device. // See the documentation below for a longer explanation - // if(rdoc_api) rdoc_api->StartFrameCapture(NULL, NULL); + if(rdoc_api) rdoc_api->StartFrameCapture(NULL, NULL); auto start = std::chrono::high_resolution_clock::now(); renderer.compute(inputs, width, height); @@ -152,6 +150,8 @@ int main() { // stop the capture if(rdoc_api) rdoc_api->EndFrameCapture(NULL, NULL); + pause(); + //------------------------- // GPU path tracer //------------------------- diff --git a/src/vk-renderer.cpp b/src/vk-renderer.cpp index 75a1ef6..e00d672 100644 --- a/src/vk-renderer.cpp +++ b/src/vk-renderer.cpp @@ -92,7 +92,7 @@ void vkrenderer::compute(const input_data& inputs, size_t width, size_t height) command_buffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, - VK_DEPENDENCY_DEVICE_GROUP_BIT, + 0, 0, nullptr, 0, |
