Commit Graph

260 Commits (d3d11)

Author SHA1 Message Date
Caleb Cornett 2a9dbc963a Remove spirv-cross, take HLSL files as shader module input, update vertex format ABI 2022-03-20 18:25:19 -04:00
cosmonaut 0d8e1590d5 conditional spirv cross build 2022-03-20 18:25:19 -04:00
Caleb Cornett bca9d1e533 Update CMakeLists to include SPIRV-Cross 2022-03-20 18:25:19 -04:00
Caleb Cornett bd8276b0ea First pass at CreateBuffer, SetBufferData, QueueDestroyBuffer, CreateGraphicsPipeline, QueueDestroyGraphicsPipeline, DrawPrimitives, and setting default viewport/scissor rects on render passes 2022-03-20 18:25:19 -04:00
Caleb Cornett 67ac5987af Actually, just bake the spirv-cross source files into the Refresh VS project directly 2022-03-20 18:25:19 -04:00
Caleb Cornett bb98f42839 Added SPIRV-Cross as a submodule. Implemented CreateShaderModule and QueueDestroyShaderModule 2022-03-20 18:25:19 -04:00
Caleb Cornett 107c94b6e9 Removed D3D11_Clear, added pWidth/pHeight to AcquireSwapchainImage, fixed(?) threading crash with swapchain Present 2022-03-20 18:25:19 -04:00
Caleb Cornett 5315e1c435 Implemented Clear, fleshed out D3D11Texture, added depth-stencil clear support in BeginRenderPass 2022-03-20 18:25:19 -04:00
Caleb Cornett d6ccca3dc3 Added mutexes for command buffer acquisition and command list execution 2022-03-20 18:25:19 -04:00
Caleb Cornett 3175f20db6 Started work on BeginRenderPass, enough to get a clear screen! 2022-03-20 18:25:19 -04:00
Caleb Cornett 9bdad47a36 Swapchain creation, resizing, and destruction 2022-03-20 18:25:19 -04:00
Caleb Cornett 387addd67d Free the actual renderer and Refresh device when destroying the device 2022-03-20 18:25:19 -04:00
Caleb Cornett 4dc3d4c45c Device setup/teardown + Command buffer acquisition and submission 2022-03-20 18:25:19 -04:00
cosmonaut f0b970496e vertex format changes 2022-03-17 14:41:16 -07:00
cosmonaut 38d14fd99d 1.4.0 2022-03-14 10:54:32 -07:00
cosmonaut 4bba0f99f9 remove lineWidth from RasterizerState 2022-03-14 10:43:01 -07:00
cosmonaut acefc530fd 1.3.0 2022-03-10 10:28:00 -08:00
cosmonaut 3820d458fe remove Clear and add pWidth and pHeight to AcquireSwapchainTexture 2022-03-10 10:21:49 -08:00
cosmonaut 7a0b0f5709 suboptimal on recreate is still technically fine 2022-03-08 11:21:36 -08:00
cosmonaut ce34f4a435 fix deadlock on multi window swapchain resize 2022-03-08 10:47:07 -08:00
TheSpydog eb5617f40e Update template for latest ABI breaks (#16)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Co-authored-by: cosmonaut <evan@moonside.games>
Reviewed-on: MoonsideGames/Refresh#16
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-03-07 08:05:58 +00:00
cosmonaut 0380a96817 Swapchain resize fixes (#18)
Fixes various errors related to the swapchain being recreated.

Additionally, `BeginRenderPass` now allows a NULL `renderArea` parameter. If NULL, Refresh will select a sensible default render area.
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-03-07 06:31:39 +00:00
cosmonaut 22236607f7 1.2.1 2022-03-04 13:39:31 -08:00
cosmonaut 715ca591f6 fix compute pipeline create bug 2022-03-04 13:37:45 -08:00
cosmonaut 7b91c5a140 1.2.0 2022-03-04 13:18:58 -08:00
cosmonaut 2731d47419 rename viewport and scissor set functions 2022-03-04 12:47:36 -08:00
cosmonaut 0fbf1b2546 fix erroneous stack free 2022-03-04 12:36:02 -08:00
cosmonaut f6b96fe34b viewport and scissor ABI break 2022-03-04 12:30:33 -08:00
cosmonaut 9422d4975f 1.1.0 2022-03-03 17:32:21 -08:00
cosmonaut 435f56f6b7 move API defines to the top 2022-03-03 17:31:33 -08:00
cosmonaut 6302603b08 add some missing frees 2022-03-03 17:30:26 -08:00
cosmonaut 5fe4c8dbf3 remove command buffer from QueueDestroy calls 2022-03-03 17:07:07 -08:00
cosmonaut 67e3a8799c 1.0.0 2022-03-02 15:55:56 -08:00
cosmonaut ee50c04428 remove interop structs 2022-03-02 15:49:40 -08:00
cosmonaut 9eae69f96b remove unused enum 2022-03-02 11:46:41 -08:00
cosmonaut 057a48e96f separate shader types 2022-03-02 11:22:52 -08:00
cosmonaut 61e83cfba8 D3D compatibility ABI break 2022-03-02 11:10:28 -08:00
cosmonaut e4ea104a88 remove swapchain log spam 2022-03-02 10:27:03 -08:00
cosmonaut 83c2372499 only mark swapchain as needing recreate if it exists 2022-03-02 10:02:07 -08:00
cosmonaut cb99489b3c Rework Presentation Flow (#15)
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: MoonsideGames/Refresh#15
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
2022-03-02 06:33:57 +00:00
cosmonaut d22bed8b76 transition entire images + rework swapchain image management 2022-02-28 12:02:39 -08:00
cosmonaut 436b990d45 Fix intro message formatting 2022-02-25 23:13:17 -08:00
cosmonaut a26d3e3689 move color blend state to AttachmentInfo 2022-02-25 17:37:42 -08:00
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