Бранимир Караџић 6 years ago
parent
commit
17a620a609
11 changed files with 203 additions and 189 deletions
  1. 145 135
      scripts/bgfx.lua
  2. 5 7
      scripts/shaderc.lua
  3. 1 1
      src/bgfx.cpp
  4. 1 1
      src/bgfx_p.h
  5. 10 9
      src/renderer_d3d11.cpp
  6. 8 6
      src/renderer_d3d12.cpp
  7. 11 10
      src/renderer_d3d9.cpp
  8. 4 4
      src/renderer_gl.cpp
  9. 13 11
      src/renderer_mtl.mm
  10. 2 2
      src/renderer_noop.cpp
  11. 3 3
      src/renderer_vk.cpp

+ 145 - 135
scripts/bgfx.lua

@@ -35,181 +35,191 @@ function overridefiles(_srcPath, _dstPath, _files)
 	}
 	}
 end
 end
 
 
-function bgfxProject(_name, _kind, _defines)
-	project ("bgfx" .. _name)
-		uuid (os.uuid("bgfx" .. _name))
-		bgfxProjectBase(_kind, _defines)
-		copyLib()
-end
-
 function bgfxProjectBase(_kind, _defines)
 function bgfxProjectBase(_kind, _defines)
-		kind (_kind)
-
-		if _kind == "SharedLib" then
-			defines {
-				"BGFX_SHARED_LIB_BUILD=1",
-			}
 
 
-			links {
-				"bimg",
-				"bx",
-			}
-
-			configuration { "vs20* or mingw*" }
-				links {
-					"gdi32",
-					"psapi",
-				}
-
-			configuration { "mingw*" }
-				linkoptions {
-					"-shared",
-				}
-
-			configuration { "linux-*" }
-				buildoptions {
-					"-fPIC",
-				}
-
-			configuration {}
-		end
-
-		includedirs {
-			path.join(BGFX_DIR, "3rdparty"),
-			path.join(BX_DIR,   "include"),
-			path.join(BIMG_DIR, "include"),
-		}
+	kind (_kind)
 
 
+	if _kind == "SharedLib" then
 		defines {
 		defines {
-			_defines,
+			"BGFX_SHARED_LIB_BUILD=1",
 		}
 		}
 
 
 		links {
 		links {
+			"bimg",
 			"bx",
 			"bx",
 		}
 		}
 
 
-		if _OPTIONS["with-glfw"] then
-			defines {
-				"BGFX_CONFIG_MULTITHREADED=0",
-			}
-		end
-
-		configuration { "Debug" }
-			defines {
-				"BGFX_CONFIG_DEBUG=1",
-			}
-
-		configuration { "vs* or mingw*", "not durango" }
-			includedirs {
-				path.join(BGFX_DIR, "3rdparty/dxsdk/include"),
-			}
-
-		configuration { "android*" }
+		configuration { "vs20* or mingw*" }
 			links {
 			links {
-				"EGL",
-				"GLESv2",
+				"gdi32",
+				"psapi",
 			}
 			}
 
 
-		configuration { "winstore*" }
+		configuration { "mingw*" }
 			linkoptions {
 			linkoptions {
-				"/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
+				"-shared",
 			}
 			}
 
 
-		configuration { "*clang*" }
+		configuration { "linux-*" }
 			buildoptions {
 			buildoptions {
-				"-Wno-microsoft-enum-value", -- enumerator value is not representable in the underlying type 'int'
-				"-Wno-microsoft-const-init", -- default initialization of an object of const type '' without a user-provided default constructor is a Microsoft extension
+				"-fPIC",
 			}
 			}
 
 
-		configuration { "osx" }
-			linkoptions {
-				"-framework Cocoa",
-				"-framework QuartzCore",
-				"-framework OpenGL",
-				"-weak_framework Metal",
-				"-weak_framework MetalKit",
-			}
+		configuration {}
+	end
 
 
-		configuration { "not linux-steamlink", "not NX32", "not NX64" }
-			includedirs {
-				-- steamlink has EGL headers modified...
-				-- NX has EGL headers modified...
-				path.join(BGFX_DIR, "3rdparty/khronos"),
-			}
+	includedirs {
+		path.join(BGFX_DIR, "3rdparty"),
+		path.join(BX_DIR,   "include"),
+		path.join(BIMG_DIR, "include"),
+	}
 
 
-		configuration { "linux-steamlink" }
-			defines {
-				"EGL_API_FB",
-			}
+	defines {
+		_defines,
+	}
 
 
-		configuration {}
+	links {
+		"bx",
+	}
+
+	if _OPTIONS["with-glfw"] then
+		defines {
+			"BGFX_CONFIG_MULTITHREADED=0",
+		}
+	end
 
 
+	configuration { "Debug" }
+		defines {
+			"BGFX_CONFIG_DEBUG=1",
+		}
+
+	configuration { "vs* or mingw*", "not durango" }
 		includedirs {
 		includedirs {
-			path.join(BGFX_DIR, "include"),
+			path.join(BGFX_DIR, "3rdparty/dxsdk/include"),
 		}
 		}
 
 
-		files {
-			path.join(BGFX_DIR, "include/**.h"),
-			path.join(BGFX_DIR, "src/**.cpp"),
-			path.join(BGFX_DIR, "src/**.h"),
-			path.join(BGFX_DIR, "scripts/**.natvis"),
+	configuration { "android*" }
+		links {
+			"EGL",
+			"GLESv2",
 		}
 		}
 
 
-		removefiles {
-			path.join(BGFX_DIR, "src/**.bin.h"),
+	configuration { "winstore*" }
+		linkoptions {
+			"/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
 		}
 		}
 
 
-		overridefiles(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-ext"), {
-			path.join(BGFX_DIR, "src/renderer_gnm.cpp"),
-			path.join(BGFX_DIR, "src/renderer_gnm.h"),
-		})
+	configuration { "*clang*" }
+		buildoptions {
+			"-Wno-microsoft-enum-value", -- enumerator value is not representable in the underlying type 'int'
+			"-Wno-microsoft-const-init", -- default initialization of an object of const type '' without a user-provided default constructor is a Microsoft extension
+		}
 
 
-		if _OPTIONS["with-amalgamated"] then
-			excludes {
-				path.join(BGFX_DIR, "src/bgfx.cpp"),
-				path.join(BGFX_DIR, "src/debug_**.cpp"),
-				path.join(BGFX_DIR, "src/dxgi.cpp"),
-				path.join(BGFX_DIR, "src/glcontext_**.cpp"),
-				path.join(BGFX_DIR, "src/hmd**.cpp"),
-				path.join(BGFX_DIR, "src/image.cpp"),
-				path.join(BGFX_DIR, "src/nvapi.cpp"),
-				path.join(BGFX_DIR, "src/renderer_**.cpp"),
-				path.join(BGFX_DIR, "src/shader**.cpp"),
-				path.join(BGFX_DIR, "src/topology.cpp"),
-				path.join(BGFX_DIR, "src/vertexdecl.cpp"),
-			}
+	configuration { "osx" }
+		linkoptions {
+			"-framework Cocoa",
+			"-framework QuartzCore",
+			"-framework OpenGL",
+			"-weak_framework Metal",
+			"-weak_framework MetalKit",
+		}
 
 
-			configuration { "xcode* or osx or ios*" }
-				files {
-					path.join(BGFX_DIR, "src/amalgamated.mm"),
-				}
+	configuration { "not linux-steamlink", "not NX32", "not NX64" }
+		includedirs {
+			-- steamlink has EGL headers modified...
+			-- NX has EGL headers modified...
+			path.join(BGFX_DIR, "3rdparty/khronos"),
+		}
 
 
-				excludes {
-					path.join(BGFX_DIR, "src/glcontext_**.mm"),
-					path.join(BGFX_DIR, "src/renderer_**.mm"),
-					path.join(BGFX_DIR, "src/amalgamated.cpp"),
-				}
+	configuration { "linux-steamlink" }
+		defines {
+			"EGL_API_FB",
+		}
 
 
-			configuration { "not (xcode* or osx or ios*)" }
-				excludes {
-					path.join(BGFX_DIR, "src/**.mm"),
-				}
+	configuration {}
 
 
-			configuration {}
+	includedirs {
+		path.join(BGFX_DIR, "include"),
+	}
 
 
-		else
-			configuration { "xcode* or osx or ios*" }
-				files {
-					path.join(BGFX_DIR, "src/glcontext_**.mm"),
-					path.join(BGFX_DIR, "src/renderer_**.mm"),
-				}
+	files {
+		path.join(BGFX_DIR, "include/**.h"),
+		path.join(BGFX_DIR, "src/**.cpp"),
+		path.join(BGFX_DIR, "src/**.h"),
+		path.join(BGFX_DIR, "scripts/**.natvis"),
+	}
 
 
-			configuration {}
+	removefiles {
+		path.join(BGFX_DIR, "src/**.bin.h"),
+	}
+
+	overridefiles(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-ext"), {
+		path.join(BGFX_DIR, "src/renderer_gnm.cpp"),
+		path.join(BGFX_DIR, "src/renderer_gnm.h"),
+	})
+
+	if _OPTIONS["with-amalgamated"] then
+		excludes {
+			path.join(BGFX_DIR, "src/bgfx.cpp"),
+			path.join(BGFX_DIR, "src/debug_**.cpp"),
+			path.join(BGFX_DIR, "src/dxgi.cpp"),
+			path.join(BGFX_DIR, "src/glcontext_**.cpp"),
+			path.join(BGFX_DIR, "src/hmd**.cpp"),
+			path.join(BGFX_DIR, "src/image.cpp"),
+			path.join(BGFX_DIR, "src/nvapi.cpp"),
+			path.join(BGFX_DIR, "src/renderer_**.cpp"),
+			path.join(BGFX_DIR, "src/shader**.cpp"),
+			path.join(BGFX_DIR, "src/topology.cpp"),
+			path.join(BGFX_DIR, "src/vertexdecl.cpp"),
+		}
+
+		configuration { "xcode* or osx or ios*" }
+			files {
+				path.join(BGFX_DIR, "src/amalgamated.mm"),
+			}
 
 
 			excludes {
 			excludes {
-				path.join(BGFX_DIR, "src/amalgamated.**"),
+				path.join(BGFX_DIR, "src/glcontext_**.mm"),
+				path.join(BGFX_DIR, "src/renderer_**.mm"),
+				path.join(BGFX_DIR, "src/amalgamated.cpp"),
+			}
+
+		configuration { "not (xcode* or osx or ios*)" }
+			excludes {
+				path.join(BGFX_DIR, "src/**.mm"),
 			}
 			}
-		end
 
 
 		configuration {}
 		configuration {}
+
+	else
+		configuration { "xcode* or osx or ios*" }
+			files {
+				path.join(BGFX_DIR, "src/glcontext_**.mm"),
+				path.join(BGFX_DIR, "src/renderer_**.mm"),
+			}
+
+		configuration {}
+
+		excludes {
+			path.join(BGFX_DIR, "src/amalgamated.**"),
+		}
+	end
+
+	if filesexist(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-ext"), {
+		path.join(BGFX_DIR, "scripts/bgfx.lua"), }) then
+
+		dofile(path.join(BGFX_DIR, "../bgfx-ext/scripts/bgfx.lua") )
+	end
+
+	configuration {}
+end
+
+function bgfxProject(_name, _kind, _defines)
+
+	project ("bgfx" .. _name)
+		uuid (os.uuid("bgfx" .. _name))
+
+		bgfxProjectBase(_kind, _defines)
+
+		copyLib()
 end
 end

+ 5 - 7
scripts/shaderc.lua

@@ -644,6 +644,11 @@ project "shaderc"
 			"psapi",
 			"psapi",
 		}
 		}
 
 
+	configuration { "osx or linux*" }
+		links {
+			"pthread",
+		}
+
 	configuration {}
 	configuration {}
 
 
 	if filesexist(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-ext"), {
 	if filesexist(BGFX_DIR, path.join(BGFX_DIR, "../bgfx-ext"), {
@@ -660,13 +665,6 @@ project "shaderc"
 		dofile(path.join(BGFX_DIR, "../bgfx-ext/scripts/shaderc.lua") )
 		dofile(path.join(BGFX_DIR, "../bgfx-ext/scripts/shaderc.lua") )
 	end
 	end
 
 
-	configuration { "osx or linux*" }
-		links {
-			"pthread",
-		}
-
-	configuration {}
-
 	strip()
 	strip()
 
 
 group "tools"
 group "tools"

+ 1 - 1
src/bgfx.cpp

@@ -2329,7 +2329,7 @@ namespace bgfx
 			}
 			}
 			else
 			else
 			{
 			{
-				_renderCtx->setMarker(data, size);
+				_renderCtx->setMarker(data, uint16_t(size)-1);
 			}
 			}
 		}
 		}
 	}
 	}

+ 1 - 1
src/bgfx_p.h

@@ -2769,8 +2769,8 @@ namespace bgfx
 		virtual void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) = 0;
 		virtual void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) = 0;
 		virtual void updateViewName(ViewId _id, const char* _name) = 0;
 		virtual void updateViewName(ViewId _id, const char* _name) = 0;
 		virtual void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) = 0;
 		virtual void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) = 0;
-		virtual void setMarker(const char* _marker, uint32_t _size) = 0;
 		virtual void invalidateOcclusionQuery(OcclusionQueryHandle _handle) = 0;
 		virtual void invalidateOcclusionQuery(OcclusionQueryHandle _handle) = 0;
+		virtual void setMarker(const char* _marker, uint16_t _len) = 0;
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) = 0;
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) = 0;
 		virtual void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) = 0;
 		virtual void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) = 0;
 		virtual void blitSetup(TextVideoMemBlitter& _blitter) = 0;
 		virtual void blitSetup(TextVideoMemBlitter& _blitter) = 0;

+ 10 - 9
src/renderer_d3d11.cpp

@@ -1981,22 +1981,23 @@ namespace bgfx { namespace d3d11
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 		}
 		}
 
 
-		void setMarker(const char* _marker, uint32_t _size) override
+		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
+		{
+			m_occlusionQuery.invalidate(_handle);
+		}
+
+		void setMarker(const char* _marker, uint16_t _len) override
 		{
 		{
 			if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) )
 			if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) )
 			{
 			{
-				uint32_t size = _size*sizeof(wchar_t);
-				wchar_t* name = (wchar_t*)alloca(size);
-				mbstowcs(name, _marker, size-2);
+				uint32_t size = _len*sizeof(wchar_t);
+				wchar_t* name = (wchar_t*)alloca(size+2);
+				name[_len] = L'\0';
+				mbstowcs(name, _marker, _len);
 				PIX_SETMARKER(D3DCOLOR_MARKER, name);
 				PIX_SETMARKER(D3DCOLOR_MARKER, name);
 			}
 			}
 		}
 		}
 
 
-		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
-		{
-			m_occlusionQuery.invalidate(_handle);
-		}
-
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		{
 		{
 			switch (_handle.type)
 			switch (_handle.type)

+ 8 - 6
src/renderer_d3d12.cpp

@@ -1859,19 +1859,21 @@ namespace bgfx { namespace d3d12
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 		}
 		}
 
 
-		void setMarker(const char* _marker, uint32_t /*_size*/) override
+		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
+		{
+			m_occlusionQuery.invalidate(_handle);
+		}
+
+		void setMarker(const char* _marker, uint16_t _len) override
 		{
 		{
+			BX_UNUSED(_len);
+
 			if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) )
 			if (BX_ENABLED(BGFX_CONFIG_DEBUG_PIX) )
 			{
 			{
 				PIX3_SETMARKER(m_commandList, D3DCOLOR_MARKER, _marker);
 				PIX3_SETMARKER(m_commandList, D3DCOLOR_MARKER, _marker);
 			}
 			}
 		}
 		}
 
 
-		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
-		{
-			m_occlusionQuery.invalidate(_handle);
-		}
-
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		{
 		{
 			switch (_handle.type)
 			switch (_handle.type)

+ 11 - 10
src/renderer_d3d9.cpp

@@ -1280,20 +1280,21 @@ namespace bgfx { namespace d3d9
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 		}
 		}
 
 
-		void setMarker(const char* _marker, uint32_t _size) override
+		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
 		{
 		{
-#if BGFX_CONFIG_DEBUG_PIX
-			uint32_t size = _size*sizeof(wchar_t);
-			wchar_t* name = (wchar_t*)alloca(size);
-			mbstowcs(name, _marker, size-2);
-			PIX_SETMARKER(D3DCOLOR_MARKER, name);
-#endif // BGFX_CONFIG_DEBUG_PIX
-			BX_UNUSED(_marker, _size);
+			m_occlusionQuery.invalidate(_handle);
 		}
 		}
 
 
-		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
+		void setMarker(const char* _marker, uint16_t _len) override
 		{
 		{
-			m_occlusionQuery.invalidate(_handle);
+#if BGFX_CONFIG_DEBUG_PIX
+			uint32_t size = _len*sizeof(wchar_t);
+			wchar_t* name = (wchar_t*)alloca(size+2);
+			mbstowcs(name, _marker, size);
+			name[_len] = L'\0';
+			PIX_SETMARKER(D3DCOLOR_MARKER, name);
+#endif // BGFX_CONFIG_DEBUG_PIX
+			BX_UNUSED(_marker, _len);
 		}
 		}
 
 
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override

+ 4 - 4
src/renderer_gl.cpp

@@ -2980,14 +2980,14 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 		}
 		}
 
 
-		void setMarker(const char* _marker, uint32_t _size) override
+		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
 		{
 		{
-			GL_CHECK(glInsertEventMarker(_size, _marker) );
+			m_occlusionQuery.invalidate(_handle);
 		}
 		}
 
 
-		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
+		void setMarker(const char* _marker, uint16_t _len) override
 		{
 		{
-			m_occlusionQuery.invalidate(_handle);
+			GL_CHECK(glInsertEventMarker(_len, _marker) );
 		}
 		}
 
 
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override

+ 13 - 11
src/renderer_mtl.mm

@@ -1002,19 +1002,21 @@ namespace bgfx { namespace mtl
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 		}
 		}
 
 
-		void setMarker(const char* _marker, uint32_t /*_size*/) override
+		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
+		{
+			m_occlusionQuery.invalidate(_handle);
+		}
+
+		void setMarker(const char* _marker, uint16_t _len) override
 		{
 		{
+			BX_UNUSED(_len);
+
 			if (BX_ENABLED(BGFX_CONFIG_DEBUG_MTL) )
 			if (BX_ENABLED(BGFX_CONFIG_DEBUG_MTL) )
 			{
 			{
 				m_renderCommandEncoder.insertDebugSignpost(_marker);
 				m_renderCommandEncoder.insertDebugSignpost(_marker);
 			}
 			}
 		}
 		}
 
 
-		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
-		{
-			m_occlusionQuery.invalidate(_handle);
-		}
-
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		{
 		{
 			BX_UNUSED(_len);
 			BX_UNUSED(_len);
@@ -1579,7 +1581,7 @@ namespace bgfx { namespace mtl
 			m_renderCommandEncoder.setVertexBuffer(vb.getBuffer(), offset, 1);
 			m_renderCommandEncoder.setVertexBuffer(vb.getBuffer(), offset, 1);
 			m_renderCommandEncoder.drawPrimitives(MTLPrimitiveTypeTriangleStrip, 0, 4, 1);
 			m_renderCommandEncoder.drawPrimitives(MTLPrimitiveTypeTriangleStrip, 0, 4, 1);
 		}
 		}
-		
+
 		void setAttachment(MTLRenderPassAttachmentDescriptor* _attachmentDescriptor, const Attachment& _at, uint8_t _textureType, bool _resolve)
 		void setAttachment(MTLRenderPassAttachmentDescriptor* _attachmentDescriptor, const Attachment& _at, uint8_t _textureType, bool _resolve)
 		{
 		{
 			_attachmentDescriptor.level = _at.mip;
 			_attachmentDescriptor.level = _at.mip;
@@ -1587,7 +1589,7 @@ namespace bgfx { namespace mtl
 				_attachmentDescriptor.depthPlane = _at.layer;
 				_attachmentDescriptor.depthPlane = _at.layer;
 			else
 			else
 				_attachmentDescriptor.slice = _at.layer;
 				_attachmentDescriptor.slice = _at.layer;
-			
+
 			if ( _resolve )
 			if ( _resolve )
 			{
 			{
 				_attachmentDescriptor.resolveLevel = _at.mip;
 				_attachmentDescriptor.resolveLevel = _at.mip;
@@ -1642,7 +1644,7 @@ namespace bgfx { namespace mtl
 						? texture.m_ptr.m_obj
 						? texture.m_ptr.m_obj
 						: NULL
 						: NULL
 						;
 						;
-					
+
 					setAttachment(_renderPassDescriptor.colorAttachments[ii], frameBuffer.m_colorAttachment[ii], texture.m_type, texture.m_ptrMsaa != NULL);
 					setAttachment(_renderPassDescriptor.colorAttachments[ii], frameBuffer.m_colorAttachment[ii], texture.m_type, texture.m_ptrMsaa != NULL);
 				}
 				}
 
 
@@ -1657,7 +1659,7 @@ namespace bgfx { namespace mtl
 
 
 					setAttachment(_renderPassDescriptor.depthAttachment, frameBuffer.m_depthAttachment, texture.m_type, NULL != texture.m_ptrMsaa);
 					setAttachment(_renderPassDescriptor.depthAttachment, frameBuffer.m_depthAttachment, texture.m_type, NULL != texture.m_ptrMsaa);
 					setAttachment(_renderPassDescriptor.stencilAttachment, frameBuffer.m_depthAttachment, texture.m_type, NULL != texture.m_ptrMsaa);
 					setAttachment(_renderPassDescriptor.stencilAttachment, frameBuffer.m_depthAttachment, texture.m_type, NULL != texture.m_ptrMsaa);
-					
+
 					if (texture.m_textureFormat == TextureFormat::D24S8)
 					if (texture.m_textureFormat == TextureFormat::D24S8)
 					{
 					{
 						if (texture.m_ptr.pixelFormat() == 255 /* Depth24Unorm_Stencil8 */
 						if (texture.m_ptr.pixelFormat() == 255 /* Depth24Unorm_Stencil8 */
@@ -3116,7 +3118,7 @@ namespace bgfx { namespace mtl
 		{
 		{
 			const Attachment& at = _attachment[ii];
 			const Attachment& at = _attachment[ii];
 			TextureHandle handle = at.handle;
 			TextureHandle handle = at.handle;
-			
+
 			if (isValid(handle) )
 			if (isValid(handle) )
 			{
 			{
 				const TextureMtl& texture = s_renderMtl->m_textures[handle.idx];
 				const TextureMtl& texture = s_renderMtl->m_textures[handle.idx];

+ 2 - 2
src/renderer_noop.cpp

@@ -226,11 +226,11 @@ namespace bgfx { namespace noop
 		{
 		{
 		}
 		}
 
 
-		void setMarker(const char* /*_marker*/, uint32_t /*_size*/) override
+		void invalidateOcclusionQuery(OcclusionQueryHandle /*_handle*/) override
 		{
 		{
 		}
 		}
 
 
-		void invalidateOcclusionQuery(OcclusionQueryHandle /*_handle*/) override
+		void setMarker(const char* /*_marker*/, uint16_t /*_len*/) override
 		{
 		{
 		}
 		}
 
 

+ 3 - 3
src/renderer_vk.cpp

@@ -2148,13 +2148,13 @@ VK_IMPORT_DEVICE
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 			bx::memCopy(m_uniforms[_loc], _data, _size);
 		}
 		}
 
 
-		void setMarker(const char* /*_marker*/, uint32_t /*_size*/) override
+		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
 		{
 		{
+			BX_UNUSED(_handle);
 		}
 		}
 
 
-		void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override
+		void setMarker(const char* /*_marker*/, uint16_t /*_len*/) override
 		{
 		{
-			BX_UNUSED(_handle);
 		}
 		}
 
 
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override
 		virtual void setName(Handle _handle, const char* _name, uint16_t _len) override