Browse Source

vulkan: multisample pipeline state fixes

rdb 5 years ago
parent
commit
e1eaea4cfa

+ 2 - 1
panda/src/vulkandisplay/vulkanGraphicsStateGuardian.h

@@ -141,7 +141,8 @@ public:
 
 
   VkPipeline make_pipeline(VulkanShaderContext *sc, const RenderState *state,
   VkPipeline make_pipeline(VulkanShaderContext *sc, const RenderState *state,
                            const GeomVertexFormat *format,
                            const GeomVertexFormat *format,
-                           VkPrimitiveTopology topology);
+                           VkPrimitiveTopology topology,
+                           VkSampleCountFlagBits multisamples);
   VkPipeline make_compute_pipeline(VulkanShaderContext *sc);
   VkPipeline make_compute_pipeline(VulkanShaderContext *sc);
 
 
   // Built-in descriptor set indices, ordered by frequency.  Static descriptor
   // Built-in descriptor set indices, ordered by frequency.  Static descriptor

+ 6 - 2
panda/src/vulkandisplay/vulkanShaderContext.I

@@ -39,7 +39,8 @@ INLINE bool VulkanShaderContext::PipelineKey::
 operator ==(const PipelineKey &other) const {
 operator ==(const PipelineKey &other) const {
   return _state == other._state
   return _state == other._state
       && _format == other._format
       && _format == other._format
-      && _topology == other._topology;
+      && _topology == other._topology
+      && _multisamples == other._multisamples;
 }
 }
 
 
 /**
 /**
@@ -53,5 +54,8 @@ operator < (const PipelineKey &other) const {
   if (_format != other._format) {
   if (_format != other._format) {
     return _format < other._format;
     return _format < other._format;
   }
   }
-  return _topology < other._topology;
+  if (_topology != other._topology) {
+    return _topology < other._topology;
+  }
+  return _multisamples < other._multisamples;
 }
 }