2525import java .nio .ByteBuffer ;
2626import java .util .Collections ;
2727import java .util .HashMap ;
28- import java .util .HashSet ;
2928import java .util .IdentityHashMap ;
3029import java .util .List ;
3130import java .util .Map ;
3231import java .util .OptionalDouble ;
33- import java .util .Set ;
3432import java .util .function .Supplier ;
3533import net .fabricmc .api .EnvType ;
3634import net .fabricmc .api .Environment ;
@@ -49,7 +47,7 @@ public class Vk11Device implements GpuDeviceBackend {
4947 private final VkDevice vkDevice ;
5048 private final IntVMA vmaObj ;
5149 private final long vma ;
52- private final Vk11GlslCompiler glslCompiler = new Vk11GlslCompiler () ;
50+ private final Vk11GlslCompiler glslCompiler ;
5351 private final DeviceInfo deviceInfo ;
5452 private final Vk11Queue graphicsQueue ;
5553 private final Vk11Queue computeQueue ;
@@ -71,10 +69,11 @@ public Vk11Device(
7169 this .instance = instance ;
7270 this .vkDevice = vkDevice ;
7371 this .vmaObj = vma ;
72+ // The GLSL compiler doesn't call Vulkan APIs so we only care about the device version
73+ this .glslCompiler = new Vk11GlslCompiler (physicalDevice .normalizedApiVersion ());
7474 this .vma = vmaObj .ptr ;
75- Set <String > extensionNames = new HashSet <>();
7675
77- Vk11PhysicalDevice .Properties properties = physicalDevice .properties ();
76+ Vk11PhysicalDevice .Properties properties = physicalDevice .properties ();
7877 features = physicalDevice .features ();
7978
8079 if (!features .fillModeNonSolid ()) ArtVK .LOGGER .warn ("Device does not support fillModeNonSolid, wireframe rendering won't work" );
@@ -84,7 +83,7 @@ public Vk11Device(
8483 physicalDevice .vendorName (),
8584 properties .driverInfo (),
8685 true ,
87- "ArtVK" ,
86+ Vk11Backend . NAME ,
8887 properties .timestampPeriod (),
8988 new DeviceLimits (
9089 features .samplerAnisotropy () ? properties .maxSamplerAnisotropy () : 1 ,
@@ -95,7 +94,7 @@ public Vk11Device(
9594 properties .maxColorAttachments ()
9695 ),
9796 new DeviceFeatures (true , features .multiDraw (), false , features .multiDrawIndirect (), true , true , true ),
98- Collections .unmodifiableSet ( extensionNames ),
97+ Collections .emptySet (), // TODO: maybe implement this?
9998 new HintsAndWorkarounds (false , false ),
10099 physicalDevice .deviceType ()
101100 );
0 commit comments