feat(render3d): 23.3 - a .dds beside a .png is uploaded BC-compressed with its whole mip chain
The device's textureCompressionBC is asked for and remembered (gvk_has_bc). tex_load_ex prefers a DX10 .dds with the full chain beside the .png (not for an edge-padded cut-out atlas): texture_dds.ludic reads BC7 / BC5 / BC4, gpu_tex_compressed makes the image with every level and no colour-attachment use (a compressed image is only sampled and copied into), and gvk_tex_upload_blocks copies each level's blocks from one staging buffer. A colour map is BC7 sampled as sRGB, a data map BC7 read as it is. examples/rendering/bc.ludic holds it, in the suite; ludic.lab's plate carries its .dds (its three shots render at 56-60 dB against the .png's). ludic-dev test 307/307, no Vulkan SDK in the environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6c663cc87b
commit
8cc4bdf66b
16 changed files with 217 additions and 1 deletions
|
|
@ -174,6 +174,10 @@ function gvk_init(render3d_st: mut Render3dState) -> bool {
|
|||
# how many of them there are. Asked for where the device has them; the renderer checks
|
||||
# gvk_has_mdi / gvk_has_dic before it takes that path.
|
||||
render3d_st.gvk_has_mdi = Vk.get_i32(f2, VkPhysicalDeviceFeatures2_features + VkPhysicalDeviceFeatures_multiDrawIndirect) == 1 and Vk.get_i32(f2, VkPhysicalDeviceFeatures2_features + VkPhysicalDeviceFeatures_drawIndirectFirstInstance) == 1
|
||||
# BC-compressed textures (BC4/5/7): every desktop GPU, Apple silicon through MoltenVK too; a
|
||||
# texture with a .dds beside its .png is uploaded compressed when this is on (texture.ludic)
|
||||
render3d_st.gvk_has_bc = Vk.get_i32(f2, VkPhysicalDeviceFeatures2_features + VkPhysicalDeviceFeatures_textureCompressionBC) == 1
|
||||
if render3d_st.gvk_has_bc { Vk.put_i32(want2, VkPhysicalDeviceFeatures2_features + VkPhysicalDeviceFeatures_textureCompressionBC, 1) }
|
||||
if render3d_st.gvk_has_mdi {
|
||||
Vk.put_i32(want2, VkPhysicalDeviceFeatures2_features + VkPhysicalDeviceFeatures_multiDrawIndirect, 1)
|
||||
Vk.put_i32(want2, VkPhysicalDeviceFeatures2_features + VkPhysicalDeviceFeatures_drawIndirectFirstInstance, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue