Commit Graph

217 Commits (a38a9d461dfc766b582f333e6a580f4154dd0785)

Author SHA1 Message Date
cosmonaut a38a9d461d fix right alignment spacing 2022-02-25 13:51:29 -08:00
cosmonaut 517399f5d9 convert all spaces to tabs 2022-02-25 13:42:11 -08:00
cosmonaut 5187093ddc reset command buffers on the thread they were spawned 2022-02-24 22:06:00 -08:00
cosmonaut 336468cc31 fix some invalid accesses 2022-02-24 21:29:52 -08:00
cosmonaut 26a5ea91ba change colorAttachmentDescriptions to a const pointer 2022-02-24 21:20:55 -08:00
cosmonaut a531fb8593 Render Pass API Streamlining (#14)
Removes `Refresh_RenderPass` and `Refresh_Framebuffer` objects.

`Refresh_BeginRenderPass` now takes a set of `Refresh_ColorAttachmentInfo` structs and an optional `Refresh_DepthStencilAttachmentInfo` struct that describe the render pass. The render pass and framebuffer objects are now managed by the implementation instead of the application.

Accordingly, `Refresh_GraphicsPipelineCreateInfo` now takes a `Refresh_GraphicsPipelineAttachmentInfo` struct that describes render passes that may be used with the pipeline. It is an error to bind a pipeline during an incompatible render pass.

Reviewed-on: MoonsideGames/Refresh#14
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-02-24 22:01:37 +00:00
cosmonaut a3aea0f796 Reset fence as late as possible 2022-02-22 21:54:32 -08:00
cosmonaut 0319c26f6a Submission rewrite (#13)
Rework submission flow to reduce waiting and improve the resource cleanup process.

This patch also gets rid of descriptor set caching.
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-02-23 00:49:45 +00:00
TheSpydog 1d72fdb995 Added a Refresh driver template file (#12)
This allows us to avoid monotonous boilerplate when bringing up new backends.
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-02-22 03:28:31 +00:00
cosmonaut b54b7cc42d fix separate swapchain synchronization 2022-02-09 21:42:19 -08:00
cosmonaut 829356d927 Revise swapchain management + remove external 2022-02-08 17:16:11 -08:00
cosmonaut 42f5f84524 Transfer Buffer Pool (#7)
Reviewed-on: MoonsideGames/Refresh#7
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-01-20 22:56:28 +00:00
cosmonaut c5a689c6d6 fix bad realloc 2022-01-17 21:28:25 -08:00
cosmonaut 80fdf09d86 fix some fence edge cases 2022-01-17 21:09:27 -08:00
cosmonaut e59e3e6b02 insert missing memory barrier after buffer copy 2022-01-17 19:57:45 -08:00
cosmonaut 49d7b1fabc fix transfer buffer offset not incrementing 2022-01-17 18:32:45 -08:00
cosmonaut 34e4b4f576 SetBufferData rework (#6)
Buffer uploads now require a command buffer, like textures do. Additionally it is now regarded as an error to upload data in the middle of a render pass.

Reviewed-on: MoonsideGames/Refresh#6
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-01-13 23:08:08 +00:00
cosmonaut 0cd9a2e8e9 fix validation error on exit 2022-01-13 12:03:44 -08:00
cosmonaut 0ffa045f78 fix UBO descriptor set not being resized 2022-01-13 12:03:32 -08:00
cosmonaut c17ec99c50 deadlock fixes 2022-01-12 23:09:06 -08:00
cosmonaut 8e04b357db reset uniform buffer offset when acquiring 2022-01-12 22:47:04 -08:00
cosmonaut 62789005dd fix for multi-submit 2022-01-12 22:04:07 -08:00
cosmonaut 53c65fb5eb fix incorrect index 2022-01-12 22:00:08 -08:00
cosmonaut 0e05ed6b34 Buffer and Submission Rework (#1)
We used to have monolithic uniform buffers on the VulkanRenderer object, but this was inefficient in the case of threaded usage.

Now, we have a pool of uniform buffers. A uniform buffer is selected from the pool when a pipeline is bound. The uniform buffers are rotated upon presentation.

Now pushing uniforms is now a concern of the command buffer instead of the pipeline. The pipeline should just always have been a static object anyway.

Additionally, we now do extra buffer record-keeping so that buffer data can be updated after a bind/draw.

Fence submission has also been restructured so that submissions don't cause unnecessary blocks. Now we assign one fence per submission, and we don't wait for fences until it's time to present.

Reviewed-on: MoonsideGames/Refresh#1
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-01-12 22:41:10 +00:00
David Weil c51b4e95d2 Fixed multiple command buffer submissions 2022-01-03 13:51:13 -08:00
cosmonaut c7666cd8fc fix use after free 2022-01-03 10:36:47 -08:00
cosmonaut ca07286e29 change texture transfer to be per-CB 2022-01-02 14:35:57 -08:00
cosmonaut 78c5d54bf1 revise SetTextureData to take a command buffer 2021-11-14 20:36:26 -08:00
cosmonaut fa61cd4653 remove cursed typedef 2021-11-08 14:48:44 -08:00
cosmonaut ab941a68df fix debug mode flag not set before creating instance 2021-11-08 14:25:18 -08:00
cosmonaut 8e37f72dc2 fix windows build release path 2021-02-27 15:35:46 -08:00
cosmonaut 9e508f4a0b add release step 2021-02-27 15:29:07 -08:00
cosmonaut 7ffaa28ae5 update vulkan headers 2021-02-27 15:14:48 -08:00
cosmonaut d53d777c31 never mind 2021-02-27 15:06:38 -08:00
cosmonaut 92cfbfb8f8 spend latest 2021-02-27 15:01:16 -08:00
cosmonaut 66c46c4bbd docker image has SDL2-devel 2021-02-27 14:58:40 -08:00
cosmonaut 20033769c5 docker image takes care of some of these packages 2021-02-27 14:18:31 -08:00
cosmonaut 98d31a3a57 separate windows build dir 2021-02-27 13:37:19 -08:00
cosmonaut 2255c9d81a use mingw64-cmake 2021-02-27 13:35:13 -08:00
cosmonaut f70b4cc285 trying something 2021-02-27 13:25:19 -08:00
cosmonaut 3c75371168 there it is 2021-02-27 13:19:12 -08:00
cosmonaut 5924be20a7 is this what its called 2021-02-27 13:17:21 -08:00
cosmonaut adcfa2bb6c make windows build use mingw 2021-02-27 13:14:39 -08:00
cosmonaut 7a35721a69 whoops 2021-02-27 13:13:42 -08:00
cosmonaut 5c61dc1bc5 fix build dir 2021-02-27 13:11:37 -08:00
cosmonaut 2fe0396bcc separate steps for linux and windows 2021-02-27 13:10:20 -08:00
cosmonaut 587f74bf34 re-add SDL2-devel to build 2021-02-27 13:07:09 -08:00
cosmonaut 6b2f49dd22 trying new docker image 2021-02-27 13:03:30 -08:00
cosmonaut dd1ba55312 fix YUV upload 2021-02-27 13:03:30 -08:00
cosmonaut b6a09517c2 change clear color type 2021-02-09 22:51:49 -08:00