Quellcode durchsuchen

shaderpipeline: build fixes for windows

rdb vor 5 Jahren
Ursprung
Commit
4b3dd40cd9

+ 5 - 3
makepanda/makepanda.py

@@ -748,6 +748,8 @@ if (COMPILER == "MSVC"):
     LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/HLSL.lib")
     LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/HLSL.lib")
     LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/OGLCompiler.lib")
     LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/OGLCompiler.lib")
     LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/OSDependent.lib")
     LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/OSDependent.lib")
+    LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/MachineIndependent.lib")
+    LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/GenericCodeGen.lib")
     LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/SPIRV.lib")
     LibName("GLSLANG", GetThirdpartyDir() + "glslang/lib/SPIRV.lib")
 
 
     IncDirectory("SPIRV-TOOLS", GetThirdpartyDir() + "spirv-tools/include")
     IncDirectory("SPIRV-TOOLS", GetThirdpartyDir() + "spirv-tools/include")
@@ -4429,7 +4431,7 @@ TargetAdd('libp3framework.dll', opts=['ADVAPI'])
 #
 #
 
 
 if (PkgSkip("GL")==0):
 if (PkgSkip("GL")==0):
-  OPTS=['DIR:panda/src/glgsg', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'SPIRV-CROSS-GLSL']
+  OPTS=['DIR:panda/src/glgsg', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'SPIRV-CROSS-GLSL', 'GLSLANG']
   TargetAdd('p3glgsg_config_glgsg.obj', opts=OPTS, input='config_glgsg.cxx')
   TargetAdd('p3glgsg_config_glgsg.obj', opts=OPTS, input='config_glgsg.cxx')
   TargetAdd('p3glgsg_glgsg.obj', opts=OPTS, input='glgsg.cxx')
   TargetAdd('p3glgsg_glgsg.obj', opts=OPTS, input='glgsg.cxx')
 
 
@@ -4532,7 +4534,7 @@ if (GetTarget() == 'darwin' and PkgSkip("COCOA")==0 and PkgSkip("GL")==0):
 #
 #
 
 
 if (GetTarget() == 'windows' and PkgSkip("GL")==0):
 if (GetTarget() == 'windows' and PkgSkip("GL")==0):
-  OPTS=['DIR:panda/src/wgldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGL',  'NVIDIACG', 'CGGL']
+  OPTS=['DIR:panda/src/wgldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGL',  'NVIDIACG', 'CGGL', 'GLSLANG']
   TargetAdd('p3wgldisplay_composite1.obj', opts=OPTS, input='p3wgldisplay_composite1.cxx')
   TargetAdd('p3wgldisplay_composite1.obj', opts=OPTS, input='p3wgldisplay_composite1.cxx')
   OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGL',  'NVIDIACG', 'CGGL']
   OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGL',  'NVIDIACG', 'CGGL']
   TargetAdd('pandagl_pandagl.obj', opts=OPTS, input='pandagl.cxx')
   TargetAdd('pandagl_pandagl.obj', opts=OPTS, input='pandagl.cxx')
@@ -4544,7 +4546,7 @@ if (GetTarget() == 'windows' and PkgSkip("GL")==0):
   if (PkgSkip('PANDAFX')==0):
   if (PkgSkip('PANDAFX')==0):
     TargetAdd('libpandagl.dll', input='libpandafx.dll')
     TargetAdd('libpandagl.dll', input='libpandafx.dll')
   TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
   TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
-  TargetAdd('libpandagl.dll', opts=['MODULE', 'WINGDI', 'GL', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM',  'NVIDIACG', 'CGGL', 'SPIRV-CROSS-GLSL'])
+  TargetAdd('libpandagl.dll', opts=['MODULE', 'WINGDI', 'GL', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM',  'NVIDIACG', 'CGGL', 'SPIRV-CROSS-GLSL', 'GLSLANG'])
 
 
 #
 #
 # DIRECTORY: panda/src/egldisplay/
 # DIRECTORY: panda/src/egldisplay/

+ 0 - 1
panda/src/dxgsg9/dxgsg9base.h

@@ -58,7 +58,6 @@
 
 
 #define D3D_MAXTEXTURESTAGES 8
 #define D3D_MAXTEXTURESTAGES 8
 
 
-typedef enum {VertexShader,PixelShader} ShaderType;
 typedef DWORD DXShaderHandle;
 typedef DWORD DXShaderHandle;
 
 
 #define ISPOW2(X) (((X) & ((X)-1))==0)
 #define ISPOW2(X) (((X) & ((X)-1))==0)

+ 5 - 5
panda/src/shaderpipeline/shaderModuleSpirV.cxx

@@ -903,7 +903,7 @@ make_block(const ShaderType::Struct *block_type, const pvector<int> &member_loca
             record_type_pointer(type_pointer_id, storage_class, type_id);
             record_type_pointer(type_pointer_id, storage_class, type_id);
 
 
             it = _instructions.insert(it, spv::OpTypePointer,
             it = _instructions.insert(it, spv::OpTypePointer,
-              {type_pointer_id, storage_class, type_id});
+              {type_pointer_id, (uint32_t)storage_class, type_id});
             ++it;
             ++it;
           }
           }
         }
         }
@@ -1007,7 +1007,7 @@ make_block(const ShaderType::Struct *block_type, const pvector<int> &member_loca
   // Insert all the type pointers for the access chains.
   // Insert all the type pointers for the access chains.
   for (uint32_t id : insert_type_pointers) {
   for (uint32_t id : insert_type_pointers) {
     it = _instructions.insert(it, spv::OpTypePointer,
     it = _instructions.insert(it, spv::OpTypePointer,
-      {id, _defs[id]._storage_class, _defs[id]._type_id});
+      {id, (uint32_t)_defs[id]._storage_class, _defs[id]._type_id});
     ++it;
     ++it;
   }
   }
 
 
@@ -1045,7 +1045,7 @@ define_type_pointer(const ShaderType *type, spv::StorageClass storage_class) {
 
 
   record_type_pointer(type_pointer_id, storage_class, type_id);
   record_type_pointer(type_pointer_id, storage_class, type_id);
   _instructions.insert(it, spv::OpTypePointer,
   _instructions.insert(it, spv::OpTypePointer,
-    {type_pointer_id, storage_class, type_id});
+    {type_pointer_id, (uint32_t)storage_class, type_id});
 
 
   // Depending on the storage class, we may need to make sure it is laid out.
   // Depending on the storage class, we may need to make sure it is laid out.
   if (storage_class == spv::StorageClassStorageBuffer ||
   if (storage_class == spv::StorageClassStorageBuffer ||
@@ -1093,7 +1093,7 @@ r_define_variable(InstructionIterator &it, const ShaderType *type, spv::StorageC
   it = _instructions.insert(it, spv::OpVariable, {
   it = _instructions.insert(it, spv::OpVariable, {
     type_pointer_id,
     type_pointer_id,
     variable_id,
     variable_id,
-    storage_class,
+    (uint32_t)storage_class,
   });
   });
   ++it;
   ++it;
 
 
@@ -1134,7 +1134,7 @@ r_define_type_pointer(InstructionIterator &it, const ShaderType *type, spv::Stor
   record_type_pointer(type_pointer_id, storage_class, type_id);
   record_type_pointer(type_pointer_id, storage_class, type_id);
 
 
   _instructions.insert(it, spv::OpTypePointer,
   _instructions.insert(it, spv::OpTypePointer,
-    {type_pointer_id, storage_class, type_id});
+    {type_pointer_id, (uint32_t)storage_class, type_id});
   ++it;
   ++it;
 
 
   return type_pointer_id;
   return type_pointer_id;