Commit Graph

157 Commits (main)

Author SHA1 Message Date
cosmonaut 057a48e96f separate shader types
continuous-integration/drone/push Build is passing Details
2022-03-02 11:22:52 -08:00
cosmonaut 61e83cfba8 D3D compatibility ABI break
continuous-integration/drone/push Build is passing Details
2022-03-02 11:10:28 -08:00
cosmonaut cb99489b3c Rework Presentation Flow (#15)
continuous-integration/drone/push Build is passing Details
Removes `Refresh_RenderTarget`, `Refresh_CreateRenderTarget` and `Refresh_QueueDestroyRenderTarget`. Render targets are now managed by the implementation.

Adds `REFRESH_TEXTUREFORMAT_B8G8R8A8`.

Adds `Refresh_AcquireSwapchainTexture`. Returns a swapchain texture for the requested window.

Removes `Refresh_QueuePresent`. It is now assumed that the texture returned by `Refresh_AcquireSwapchainTexture` will be presented. This texture can be manipulated like any other texture.

Adds `Refresh_GetSwapchainFormat`. Returns the swapchain format for the requested window.

Reviewed-on: #15
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-03-02 06:33:57 +00:00
cosmonaut a26d3e3689 move color blend state to AttachmentInfo
continuous-integration/drone/push Build is passing Details
2022-02-25 17:37:42 -08:00
cosmonaut 517399f5d9 convert all spaces to tabs
continuous-integration/drone/push Build is passing Details
2022-02-25 13:42:11 -08:00
cosmonaut 26a5ea91ba change colorAttachmentDescriptions to a const pointer
continuous-integration/drone/push Build is passing Details
2022-02-24 21:20:55 -08:00
cosmonaut a531fb8593 Render Pass API Streamlining (#14)
continuous-integration/drone/push Build is passing Details
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: #14
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-02-24 22:01:37 +00:00
cosmonaut 0319c26f6a Submission rewrite (#13)
continuous-integration/drone/push Build is passing Details
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
cosmonaut 829356d927 Revise swapchain management + remove external
continuous-integration/drone/push Build is passing Details
2022-02-08 17:16:11 -08:00
cosmonaut 34e4b4f576 SetBufferData rework (#6)
continuous-integration/drone/push Build is passing Details
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: #6
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-01-13 23:08:08 +00:00
cosmonaut 0e05ed6b34 Buffer and Submission Rework (#1)
continuous-integration/drone/push Build is passing Details
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: #1
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-01-12 22:41:10 +00:00
cosmonaut 78c5d54bf1 revise SetTextureData to take a command buffer
continuous-integration/drone/push Build is passing Details
2021-11-14 20:36:26 -08:00
cosmonaut fa61cd4653 remove cursed typedef
continuous-integration/drone/push Build is passing Details
2021-11-08 14:48:44 -08:00
cosmonaut b6a09517c2 change clear color type
continuous-integration/drone/push Build is passing Details
2021-02-09 22:51:49 -08:00
cosmonaut 8f1cdf190f change shader uniform push to take pipelines instead of command buffers
continuous-integration/drone/push Build is passing Details
2021-02-05 19:59:29 -08:00
cosmonaut 7f3e89315e uniform API update
continuous-integration/drone/push Build is passing Details
2021-02-02 16:37:01 -08:00
cosmonaut 4699c158f3 calculate texture length internally + fix rename
continuous-integration/drone/push Build is passing Details
2021-01-31 21:17:27 -08:00
cosmonaut 68d9a74ff4 change renderArea to a pointer
continuous-integration/drone/push Build is passing Details
2021-01-26 20:27:42 -08:00
cosmonaut 316e662f44 remove distinction between color target and depth target
continuous-integration/drone/push Build is passing Details
2021-01-26 18:57:46 -08:00
cosmonaut fe03f1739a change Clear definition to make more sense
continuous-integration/drone/push Build is passing Details
2021-01-22 14:16:02 -08:00
cosmonaut 8d51b423cd isCube should be a byte 2021-01-14 02:05:21 -08:00
cosmonaut 56f4c3c2c4 texture creation uses one function + Refresh_TextureCreateInfo 2021-01-14 01:52:45 -08:00
cosmonaut 79bc36d99d replace topologyState with primitiveType 2021-01-13 21:06:20 -08:00
cosmonaut b25daa5198 remove unused parameters from draw calls 2021-01-13 21:04:53 -08:00
thatcosmonaut b12b785dbe
External Interop (#14) 2021-01-13 17:37:54 -08:00
thatcosmonaut 4783d2efc2
remove unused DepthStencilTexture typedef 2021-01-06 17:36:08 -08:00
cosmonaut ecbf434df9 fix multisampleState 2021-01-05 18:05:01 -08:00
cosmonaut 4b6f17054c rename AddDispose to QueueDestroy 2021-01-05 17:02:36 -08:00
cosmonaut d3d9c9ad55 rename Set_Samplers to Bind_Samplers 2021-01-05 17:00:06 -08:00
cosmonaut c1612c496f clear options have bits now 2021-01-05 16:19:27 -08:00
cosmonaut df88c6a67c expose HookLogFunctions 2021-01-05 16:07:42 -08:00
cosmonaut b19fab415d misc API tweaks 2021-01-05 15:53:16 -08:00
cosmonaut 4ca101099d uncapitalize REFRESH in API calls 2021-01-05 15:05:16 -08:00
cosmonaut 5a92fdf984 move count param on REFRESH_Submit 2021-01-03 14:57:46 -08:00
cosmonaut 788c63f3ac rename SURFACEFORMAT to COLORFORMAT 2021-01-03 14:53:12 -08:00
thatcosmonaut b4dee16f80
Texture API Refactor (#9) 2021-01-03 14:37:02 -08:00
cosmonaut e82bce10dc texture copy API 2021-01-03 14:00:43 -08:00
cosmonaut 087a60fa52 add wait API call 2021-01-03 14:00:43 -08:00
cosmonaut 540c0985b7 proper texture staging + fix buffer dispose api 2021-01-03 14:00:43 -08:00
cosmonaut dc2c3ef111 transfer fixes 2021-01-03 14:00:43 -08:00
cosmonaut f8c99c4e18 make gets and sets async 2021-01-03 14:00:43 -08:00
cosmonaut e0ff380989 implement transfer queue 2021-01-03 14:00:43 -08:00
cosmonaut c818e332e7 started exposing command buffers 2021-01-03 14:00:43 -08:00
cosmonaut bc3c52162b compute barriers 2020-12-30 23:07:59 -08:00
cosmonaut 5b3fa07790 more compute implementation 2020-12-30 23:07:59 -08:00
cosmonaut 5bddb9faab add compute related functions to API 2020-12-30 23:07:59 -08:00
cosmonaut dc92a1e274 started implementing compute structure 2020-12-30 23:07:59 -08:00
cosmonaut b891d44cf3 fix var name 2020-12-28 23:44:54 -08:00
cosmonaut d6cd3715cb implement texture getters 2020-12-28 23:41:59 -08:00
cosmonaut cea9b853a4 implement Clear 2020-12-28 22:19:46 -08:00
cosmonaut ee91cca9f6 add new barrier for any-shader sampling 2020-12-28 21:43:14 -08:00
cosmonaut fd01d6c033 name tweak + remove d24s8 2020-12-28 20:09:31 -08:00
cosmonaut 2548833525 update API to allow batchable shader params 2020-12-28 19:32:49 -08:00
cosmonaut a92a03a69a texture usage for auto layout transition 2020-12-28 13:40:26 -08:00
cosmonaut 941cce595c add texture layout transition to API 2020-12-28 12:15:17 -08:00
cosmonaut ce0eea711b SetSamplers no longer takes pipeline 2020-12-27 23:13:49 -08:00
cosmonaut 6e59750ff2 image load and save 2020-12-27 22:45:12 -08:00
cosmonaut d23b2a6a75 cacheing descriptor set layouts and pipeline layouts 2020-12-27 13:26:55 -08:00
cosmonaut ae44d3ef23 shader uniforms 2020-12-23 13:11:09 -08:00
cosmonaut 25314dad57 layout transition on BeginRenderPass 2020-12-22 23:17:09 -08:00
cosmonaut 89f8ef1e9e draw call API revision 2020-12-22 22:56:26 -08:00
cosmonaut 87920c0048 hack to fix sub buffer index issue 2020-12-22 21:53:39 -08:00
cosmonaut a586040123 misc fixes 2020-12-22 20:22:17 -08:00
cosmonaut a795e1f825 rename to QueuePresent + make textureslice input a pointer 2020-12-21 18:54:36 -08:00
cosmonaut bab86149c9 some init fixes 2020-12-21 17:59:08 -08:00
cosmonaut 9fa0e54e67 add PresentationParameters 2020-12-21 16:18:21 -08:00
cosmonaut 7de212c322 rename Gen_ functions to Create_ 2020-12-21 15:50:12 -08:00
cosmonaut 06b805cf93 presentation loop 2020-12-21 15:44:43 -08:00
cosmonaut feb4b5e16b vertex and index buffers 2020-12-21 12:37:54 -08:00
cosmonaut 778a8d89bd splitting up push shader params by stages 2020-12-20 01:33:32 -08:00
cosmonaut 4233c7767e draw functions 2020-12-20 01:29:15 -08:00
cosmonaut 2f06a8a13f BeginRenderPass 2020-12-20 00:05:12 -08:00
cosmonaut ffae2d8bfb remove AddDisposeShaderParamBuffer 2020-12-19 23:41:03 -08:00
cosmonaut db50e07be6 note about setting buffer data 2020-12-19 23:35:30 -08:00
cosmonaut 7d2018e712 BindVertexBuffers and BindIndexBuffer 2020-12-19 23:31:55 -08:00
cosmonaut bedc1f7196 set sampler functions 2020-12-18 21:35:21 -08:00
cosmonaut bd4bd74020 revising shader param API 2020-12-18 18:24:22 -08:00
cosmonaut ba9447ae4c render targets 2020-12-18 16:39:03 -08:00
cosmonaut a6f13dff8d implement texture creation 2020-12-18 14:35:33 -08:00
cosmonaut 501a9d61a2 fix some warnings and add vulkan headers 2020-12-17 16:39:25 -08:00
cosmonaut 91bea9e25a remove unneeded layout info 2020-12-17 12:11:50 -08:00
cosmonaut 75093afddb fix some doc comments 2020-12-17 11:44:34 -08:00
cosmonaut 09b776d172 implement CreateGraphicsPipeline 2020-12-17 11:40:49 -08:00
cosmonaut b10b9bfafd VULKAN_CreateRenderPass 2020-12-17 00:19:02 -08:00
cosmonaut fd731ac648 add Present call to API 2020-12-16 20:19:11 -08:00
cosmonaut 458bd6049d swapchain creation 2020-12-16 19:50:31 -08:00
cosmonaut 36eb134c9f instantiation madness 2020-12-16 19:28:02 -08:00
cosmonaut ee6bcdc427 fix warnings on all but vulkan driver 2020-12-16 18:38:22 -08:00
cosmonaut f8621562f2 remove FNA3D dependency 2020-12-16 18:12:20 -08:00
cosmonaut dcef2e68c7 add boilerplate 2020-12-16 17:08:44 -08:00
cosmonaut c57842afb9 laying out the multi-driver skeleton 2020-12-16 16:27:14 -08:00
cosmonaut 491c49d8ad device create and destroy 2020-12-16 15:33:09 -08:00
cosmonaut 1d152a61bf shader param buffer stuff 2020-12-16 15:15:42 -08:00
cosmonaut fddba3a94d shader interface 2020-12-16 14:59:14 -08:00
cosmonaut 5850d0851f getters and setters and disposers 2020-12-16 14:53:34 -08:00
cosmonaut 6d10378978 targets 2020-12-16 14:02:03 -08:00
cosmonaut 3bd6dfae2d texture creation 2020-12-16 13:49:10 -08:00
cosmonaut 78f2dc1bde comments 2020-12-16 13:40:11 -08:00
cosmonaut 2229af92d4 render pass related things 2020-12-16 13:28:06 -08:00
cosmonaut 1d66372b83 sampler and shader param sets 2020-12-16 12:47:54 -08:00