FNA-XNA / FNA3D

FNA3D - 3D Graphics Library for FNA
http://fna-xna.github.io/
Other
267 stars 44 forks source link

Fix validation warning when rendering to mipped RT in vulkan #183

Closed kg closed 7 months ago

kg commented 8 months ago

When preparing to render to a mipmapped render target, we need to transition all of its mip levels into color attachment state (they would otherwise be in read only state) in order to satisfy the vulkan validation layer.

flibitijibibo commented 8 months ago

I believe this change is covered by ResolveTarget, but would have to check locally... AFAIK this is good

kg commented 8 months ago

For context, this PR makes this set of validator errors go away: image

thatcosmonaut commented 8 months ago

https://github.com/FNA-XNA/FNA3D/blob/master/src/FNA3D_Driver_Vulkan.c#L5328

The real bug is that the rtView contains every mip level when it should only contain level 0. Probably also true for the layers as well.

kg commented 7 months ago

This is the wrong fix, I think @thatcosmonaut is on it though