@@ -47,6 +47,7 @@ public class Vk11Device implements GpuDeviceBackend {
4747 private final Map <ShaderCompilationKey , Vk11IntermediaryShaderModule > shaderCache = new HashMap <>();
4848 private final Vk11Instance instance ;
4949 private final VkDevice vkDevice ;
50+ private final Vk11Features realFeatures ;
5051 private final IntVMA vmaObj ;
5152 private final long vma ;
5253 private final Vk11GlslCompiler glslCompiler = new Vk11GlslCompiler ();
@@ -61,16 +62,16 @@ public class Vk11Device implements GpuDeviceBackend {
6162 private final Vk11FramebufferCache framebufferCache ;
6263
6364 public Vk11Device (
64- final ShaderSource defaultShaderSource ,
65- final Vk11Instance instance ,
66- final Vk11PhysicalDevice physicalDevice ,
67- final Set <String > enabledDeviceExtensions ,
68- final VkDevice vkDevice ,
69- final IntVMA vma
65+ final ShaderSource defaultShaderSource ,
66+ final Vk11Instance instance ,
67+ final Vk11PhysicalDevice physicalDevice ,
68+ final Set <String > enabledDeviceExtensions ,
69+ final VkDevice vkDevice ,
70+ final IntVMA vma
7071 ) {
7172 this .defaultShaderSource = defaultShaderSource ;
7273 this .instance = instance ;
73- this .vkDevice = vkDevice ;
74+ this .vkDevice = vkDevice ;
7475 this .vmaObj = vma ;
7576 this .vma = vmaObj .ptr ;
7677 Set <String > extensionNames = new HashSet <>();
@@ -91,7 +92,9 @@ public Vk11Device(
9192 hasAnisotropy = features .samplerAnisotropy ();
9293 hasAttributeDivisor = enabledDeviceExtensions .contains ("VK_EXT_vertex_attribute_divisor" );
9394
94- if (!hasFillModeNonSolid ) ArtVK .LOGGER .warn ("Device does not support fillModeNonSolid, wireframe rendering won't work" );
95+ this .realFeatures = new Vk11Features (features .multiDrawIndirect ());
96+
97+ if (!hasFillModeNonSolid ) ArtVK .LOGGER .warn ("Device does not support fillModeNonSolid, wireframe rendering won't work" );
9598
9699 this .deviceInfo = new DeviceInfo (
97100 physicalDevice .deviceName (),
@@ -108,7 +111,7 @@ public Vk11Device(
108111 Integer .MAX_VALUE ,
109112 limits .maxColorAttachments ()
110113 ),
111- new DeviceFeatures (true , enabledDeviceExtensions .contains ("VK_EXT_multi_draw" ), false , features . multiDrawIndirect () , true , true , true ),
114+ new DeviceFeatures (true , enabledDeviceExtensions .contains ("VK_EXT_multi_draw" ), false , true , true , true , true ),
112115 Collections .unmodifiableSet (extensionNames ),
113116 new HintsAndWorkarounds (false , false ),
114117 physicalDevice .deviceType ()
@@ -166,6 +169,9 @@ public Vk11Instance instance() {
166169 public VkDevice vkDevice () {
167170 return this .vkDevice ;
168171 }
172+ public Vk11Features realFeatures (){
173+ return this .realFeatures ;
174+ }
169175
170176 public Vk11Queue graphicsQueue () {
171177 return this .graphicsQueue ;
0 commit comments