X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fmodule.cpp;h=eaed8a45c7b7ed04003e996d28bcd7c85b99e68c;hb=34d956d6890ce7070741667d4864fa798883da72;hp=601aae99c8952e355016562d4589e333cfbd2798;hpb=e9a898f315b5d1396f196d785913a283c30940f2;p=libs%2Fgl.git diff --git a/source/core/module.cpp b/source/core/module.cpp index 601aae99..eaed8a45 100644 --- a/source/core/module.cpp +++ b/source/core/module.cpp @@ -117,7 +117,7 @@ void SpirVModule::remap_pointers_from(const SpirVModule &other) void SpirVModule::load_code(IO::Base &io) { - UInt32 buffer[1024]; + uint32_t buffer[1024]; while(1) { unsigned len = io.read(reinterpret_cast(buffer), sizeof(buffer)); @@ -145,7 +145,7 @@ void SpirVModule::reflect() if(code[0]==SPIRV_MAGIC_REVERSED) { - for(UInt32 &c: code) + for(uint32_t &c: code) c = ((c&0xFF)<<24) || ((c&0xFF00)<<8) | ((c>>8)&0xFF00) | ((c>>24)&0xFF); } else if(code[0]!=SPIRV_MAGIC) @@ -245,30 +245,6 @@ void SpirVModule::reflect() } -SpirVModule::EntryPoint::EntryPoint(): - stage(VERTEX) -{ } - - -SpirVModule::StructMember::StructMember(): - type(VOID), - struct_type(0), - offset(0), - array_size(0), - array_size_spec(0), - array_stride(0), - matrix_stride(0) -{ } - - -SpirVModule::Variable::Variable(): - type(VOID), - struct_type(0), - location(-1), - descriptor_set(-1), - binding(-1) -{ } - bool SpirVModule::Variable::operator==(const Variable &other) const { if(storage!=UNIFORM_CONSTANT && storage!=UNIFORM) @@ -281,17 +257,7 @@ bool SpirVModule::Variable::operator==(const Variable &other) const } -SpirVModule::TypeInfo::TypeInfo(): - type(VOID), - struct_type(0), - array_size_spec(0), - array_size(0), - array_stride(0), - storage(static_cast(-1)) -{ } - - -UInt32 SpirVModule::Reflection::get_opcode(UInt32 op) +uint32_t SpirVModule::Reflection::get_opcode(uint32_t op) { return op&0xFFFF; } @@ -323,7 +289,7 @@ string SpirVModule::Reflection::read_string(CodeIterator &op, const CodeIterator throw invalid_module("Unterminated SPIR-V string literal"); } -void SpirVModule::Reflection::reflect_code(const vector &code) +void SpirVModule::Reflection::reflect_code(const vector &code) { for(CodeIterator op=code.begin()+5; op!=code.end(); ) {