Miscellaneous API changes + more MSAA fixes #26

Merged
cosmonaut merged 1 commits from TheSpydog/Refresh:api-changes into main 2022-11-08 19:09:24 +00:00

Breaking API Changes

  • Removed REFRESH_SAMPLECOUNT_16/32/64, since hardware support for these sample counts is generally poor (and completely non-existent with MoltenVK and certain consoles).
  • Removed unused sampleCount parameter from Refresh_TextureCreateInfo.
  • Removed sampleCount parameter from Refresh_ColorAttachmentDescription. The existence of this parameter meant you had to sync up three different sample count values (render pass, pipeline, and color attachment description) whenever you wanted to use multisampling. However, Vulkan requires that all color attachments in a given pipeline must match the pipeline's sample count anyway, so we can assume all color attachments will use the pipeline's sample count.
  • Removed the renderArea parameter from Refresh_BeginRenderPass() since it didn't serve much practical purpose and slightly complicated things on the MoonWorks managed side.

Behavior Changes

  • When creating a render pass or graphics pipeline, the requested multisample count will be converted into a sample count that's actually supported by the GPU. For example, if you request 8x MSAA on a device that only supports up to 4x MSAA, it will silently fall back to 4x MSAA.
  • All color attachments are now forced to have an internal store op of STORE, even if REFRESH_STORE_OP_DONTCARE is specified. The one exception is internal multisample textures -- if DONTCARE is used, those textures will be discarded to save on bandwidth. (Their resolve textures will still be stored.)
  • The RenderPass hashing logic was updated so that it would still work correctly with the removal of Refresh_ColorAttachmentDescription.sampleCount.

Bug Fixes

  • Fixed bugs where multisampling logic wasn't kicking in for certain sample counts due to incorrect enum comparisons.
**Breaking API Changes** * Removed `REFRESH_SAMPLECOUNT_16/32/64`, since hardware support for these sample counts is generally poor (and completely non-existent with MoltenVK and certain consoles). * Removed unused `sampleCount` parameter from `Refresh_TextureCreateInfo`. * Removed `sampleCount` parameter from `Refresh_ColorAttachmentDescription`. The existence of this parameter meant you had to sync up three different sample count values (render pass, pipeline, and color attachment description) whenever you wanted to use multisampling. However, Vulkan requires that all color attachments in a given pipeline _must_ match the pipeline's sample count anyway, so we can assume all color attachments will use the pipeline's sample count. * Removed the `renderArea` parameter from `Refresh_BeginRenderPass()` since it didn't serve much practical purpose and slightly complicated things on the MoonWorks managed side. **Behavior Changes** * When creating a render pass or graphics pipeline, the requested multisample count will be converted into a sample count that's actually supported by the GPU. For example, if you request 8x MSAA on a device that only supports up to 4x MSAA, it will silently fall back to 4x MSAA. * All color attachments are now forced to have an internal store op of `STORE`, even if `REFRESH_STORE_OP_DONTCARE` is specified. The one exception is internal multisample textures -- if `DONTCARE` is used, those textures will be discarded to save on bandwidth. (Their resolve textures will still be stored.) * The RenderPass hashing logic was updated so that it would still work correctly with the removal of `Refresh_ColorAttachmentDescription.sampleCount`. **Bug Fixes** * Fixed bugs where multisampling logic wasn't kicking in for certain sample counts due to incorrect enum comparisons.
TheSpydog added 1 commit 2022-11-05 03:44:23 +00:00
continuous-integration/drone/pr Build is passing Details
a0b18dc32e
miscellaneous API changes + more MSAA fixes
cosmonaut merged commit 297f234957 into main 2022-11-08 19:09:24 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MoonsideGames/Refresh#26
There is no content yet.