msiglreith / rostkatze

C++ implementation of Vulkan sitting on D3D12 :cat2:
Apache License 2.0
82 stars 2 forks source link

Crude conservatize raster support.. #5

Closed oscarbg closed 6 years ago

oscarbg commented 6 years ago

Hi, I played with new conservative raster sample @SaschaWillems added to his samples pack, as you seem to play with them and found that it doesn't work on rostkatze but it crashes even after removing new conservative stuff.. you could give a try.. more detail from https://github.com/SaschaWillems/Vulkan/issues/422:

in fact by using it you conservative raster sample running on rostkatze it failed of course, but for reasons not related to conser. raster. per see so I modified triangle basic demo which works correctly with rostkatze and added mininal conser. raster. support to this sample (removed code to checking conser. raster. caps which requires extension also not present on this wrapper).. and with original triangle playing well I made improvements to rostkatze and now locally have it with conservate raster support (i.e. passing overestimate attribute as D3D12 rasterizer option..

well I'm attaching 2 patches one for triangle sample adding minimal conservative raster support and other for adding conservative raster to rostkatze.. all in all very crude (overestimate support enabled or disable) but it works anyway.. of course proper support will require more work starting with support for VK_KHR_get_physical_device_properties2.. EDIT: conserasterpatches.zip

msiglreith commented 6 years ago

Thanks! I'll take a look and merge it into the master.

msiglreith commented 6 years ago

Implemented VK_KHR_get_physical_device_properties2 and expose conservative rasterization extension (not implemented so far). The crash is caused by buffer copy (https://github.com/SaschaWillems/Vulkan/issues/430). The staging buffer is (currently) aligned for TRANSFER_SRC usage to a D3D12 texture data alignment value. To workaround this issue, the region size (https://github.com/SaschaWillems/Vulkan/blob/master/base/VulkanDevice.hpp#L445) should be set to the minimum of src and dst buffer size.

msiglreith commented 6 years ago

Should be fully implemented now, except inner coverage semantic value handling for SPIRV