Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 2019 00:50:56 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r503930 - in head/emulators/rpcs3: . files
Message-ID:  <201906110050.x5B0ouAc086897@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Jun 11 00:50:56 2019
New Revision: 503930
URL: https://svnweb.freebsd.org/changeset/ports/503930

Log:
  emulators/rpcs3: update to 0.0.6.8205
  
  Changes:	https://github.com/RPCS3/rpcs3/compare/2bc0ea37a...b3513cd7f
  MFH:		2019Q2 (implicit for snapshots?)

Added:
  head/emulators/rpcs3/files/extra-patch-revert-f9ad6358563b   (contents, props changed)
  head/emulators/rpcs3/files/patch-rpcs3_Emu_RSX_VK_VulkanAPI.h   (contents, props changed)
Modified:
  head/emulators/rpcs3/Makefile   (contents, props changed)
  head/emulators/rpcs3/distinfo   (contents, props changed)

Modified: head/emulators/rpcs3/Makefile
==============================================================================
--- head/emulators/rpcs3/Makefile	Mon Jun 10 22:48:55 2019	(r503929)
+++ head/emulators/rpcs3/Makefile	Tue Jun 11 00:50:56 2019	(r503930)
@@ -2,8 +2,8 @@
 
 PORTNAME=	rpcs3
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.0.6-8196 # git rev-list --count HEAD
-DISTVERSIONSUFFIX=	-g2bc0ea37a
+DISTVERSION=	0.0.6-8205 # git rev-list --count HEAD
+DISTVERSIONSUFFIX=	-gb3513cd7f
 CATEGORIES=	emulators
 
 PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
@@ -46,6 +46,11 @@ CMAKE_ON=	CMAKE_SKIP_RPATH USE_SYSTEM_FFMPEG USE_SYSTE
 CMAKE_OFF=	USE_NATIVE_INSTRUCTIONS
 CXXFLAGS+=	-Wno-macro-redefined # __STDC_*_MACROS sys/cdefs.h vs. llvm-config
 LDFLAGS+=	-Wl,--as-needed # GLU
+
+# XXX Remove after FreeBSD 11.2/12.0 reach EOL i.e., around 2020-02-01
+.if !exists(/usr/include/c++/v1/charconv) && exists(/usr/lib/libc++.so)
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-revert-f9ad6358563b
+.endif
 
 OPTIONS_DEFINE=	ALSA EVDEV GDB LLVM PULSEAUDIO VULKAN
 OPTIONS_DEFAULT=ALSA LLVM VULKAN

Modified: head/emulators/rpcs3/distinfo
==============================================================================
--- head/emulators/rpcs3/distinfo	Mon Jun 10 22:48:55 2019	(r503929)
+++ head/emulators/rpcs3/distinfo	Tue Jun 11 00:50:56 2019	(r503930)
@@ -1,6 +1,6 @@
-TIMESTAMP = 1560011695
-SHA256 (RPCS3-rpcs3-v0.0.6-8196-g2bc0ea37a_GH0.tar.gz) = 51b0f4b56e03da1d860004016ea7868ab356e4efec96031e29b61592bfc19955
-SIZE (RPCS3-rpcs3-v0.0.6-8196-g2bc0ea37a_GH0.tar.gz) = 5390668
+TIMESTAMP = 1560203291
+SHA256 (RPCS3-rpcs3-v0.0.6-8205-gb3513cd7f_GH0.tar.gz) = a7702c05bde3c01844aa6d682014ab8458550e7d0f9ee21db90e20cd814c3daa
+SIZE (RPCS3-rpcs3-v0.0.6-8205-gb3513cd7f_GH0.tar.gz) = 5436746
 SHA256 (RPCS3-hidapi-hidapi-0.8.0-rc1-27-g9220f5e_GH0.tar.gz) = 3120e0b701943f452760e45f9fc1ac50bab356ad4c807b4cac4598041c5ca1a5
 SIZE (RPCS3-hidapi-hidapi-0.8.0-rc1-27-g9220f5e_GH0.tar.gz) = 105400
 SHA256 (RPCS3-llvm-b860b5e8f4ee_GH0.tar.gz) = c151972a0c8ceac568c24b61e63d2ecbdac0f125185e23fc2238e0a14048256e

Added: head/emulators/rpcs3/files/extra-patch-revert-f9ad6358563b
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/rpcs3/files/extra-patch-revert-f9ad6358563b	Tue Jun 11 00:50:56 2019	(r503930)
@@ -0,0 +1,169 @@
+In file included from rpcs3/Emu/RSX/GL/GLGSRender.cpp:4:
+In file included from rpcs3/Emu/RSX/GL/GLGSRender.h:8:
+In file included from rpcs3/Emu/RSX/GL/GLTextOut.h:5:
+rpcs3/Emu/RSX/GL/../Common/TextGlyphs.h:4:10: fatal error: 'charconv' file not found
+#include <charconv>
+         ^~~~~~~~~~
+rpcs3/Emu/RSX/GL/../Common/TextGlyphs.h:174:9: error:
+      no member named 'from_chars' in namespace 'std'
+                        std::from_chars(index.data(), index.data() + index.size(), this_glyph.character, 16);
+                        ~~~~~^
+rpcs3/Emu/RSX/GL/../Common/TextGlyphs.h:182:11: error:
+      no member named 'from_chars' in namespace 'std'
+                                        std::from_chars(line.data(), line.data() + line.size(), this_glyph...
+                                        ~~~~~^
+
+--- rpcs3/Emu/RSX/Common/TextGlyphs.h.orig	2019-06-10 11:57:03 UTC
++++ rpcs3/Emu/RSX/Common/TextGlyphs.h
+@@ -1,13 +1,9 @@
+ #pragma once
+ 
+-#include <array>
+-#include <charconv>
+-#include <string_view>
+-#include <unordered_map>
+ #include <vector>
++#include <unordered_map>
++#include <Utilities/types.h>
+ 
+-#include "Utilities/types.h"
+-
+ /**
+ * FONT GLYPHS GO HERE
+ * Any font in hex format should work here.
+@@ -16,7 +12,7 @@
+ * This example is the GNU unifont glyph set
+ */
+ 
+-constexpr std::array<std::string_view, 128> GNU_UNIFONT_GLYPHS =
++const static std::string GNU_UNIFONT_GLYPHS[128] =
+ {
+ 	"0000 : AAAA00018000000180004A51EA505A51C99E0001800000018000000180005555",
+ 	"0001 : AAAA00018000000180003993C252325F8A527193800000018000000180005555",
+@@ -157,37 +153,40 @@ class GlyphManager (private)
+ 		u8 character;
+ 		u32 glyph_point_offset;
+ 		u32 points_count;
+-		std::array<u8, 16> plot;
++		std::vector<u8> plot;
+ 	};
+ 
+-	std::vector<glyph> glyph_map;
++	std::unordered_map<u8, glyph> glyph_map;
+ 
+-	void decode_glyph_map(const std::array<std::string_view, 128>& font_glyphs)
++	void decode_glyph_map(const std::string glyphs[128])
+ 	{
+-		glyph_map.reserve(font_glyphs.size());
+-
+-		for (const auto &font_glyph : font_glyphs)
++		for (int i = 0; i < 128; ++i)
+ 		{
+-			glyph this_glyph{};
++			std::string character = glyphs[i];
++			std::string index = character.substr(0, 4);
++			std::string glyph_data = character.substr(7);
+ 
+-			const auto index = font_glyph.substr(0, 4);
+-			std::from_chars(index.data(), index.data() + index.size(), this_glyph.character, 16);
++			glyph this_glyph;
++			this_glyph.character = (u8)strtol(index.c_str(), nullptr, 16);
++			this_glyph.plot.reserve(16);
+ 
+-			const auto glyph_data = font_glyph.substr(7);
+ 			if (glyph_data.length() == 32)
+ 			{
+-				for (std::size_t n = 0; n < this_glyph.plot.size(); ++n)
++				for (int n = 0; n < 16; ++n)
+ 				{
+-					const auto line = glyph_data.substr(n * 2, 2);
+-					std::from_chars(line.data(), line.data() + line.size(), this_glyph.plot[n], 16);
++					std::string line = glyph_data.substr(n * 2, 2);
++					u8 value = (u8)strtol(line.c_str(), nullptr, 16);
++					this_glyph.plot.push_back(value);
+ 				}
+ 			}
+ 			else
+ 			{
+-				// TODO: Support 16-wide characters
++				//TODO: Support 16-wide characters
++				for (int n = 0; n < 16; ++n)
++					this_glyph.plot.push_back(0);
+ 			}
+ 
+-			glyph_map.push_back(this_glyph);
++			glyph_map[this_glyph.character] = this_glyph;
+ 		}
+ 	}
+ 
+@@ -198,12 +197,13 @@ class GlyphManager (private)
+ 		float x;
+ 		float y;
+ 
+-		explicit glyph_point(float _x, float _y) : x(_x), y(_y)
++		glyph_point(float _x, float _y) : x(_x), y(_y)
+ 		{}
+ 	};
+ 
+ 	GlyphManager()
+ 	{
++		glyph_map = {};
+ 		decode_glyph_map(GNU_UNIFONT_GLYPHS);
+ 	}
+ 
+@@ -213,11 +213,12 @@ class GlyphManager (private)
+ 
+ 		for (auto &entry : glyph_map)
+ 		{
+-			entry.glyph_point_offset = (u32)result.size();
++			glyph& text = entry.second;
++			text.glyph_point_offset = (u32)result.size();
+ 
+-			for (std::size_t j = 0; j < entry.plot.size(); ++j)
++			for (int j = 0; j < 16; ++j)
+ 			{
+-				const auto &line = entry.plot[j];
++				auto &line = text.plot[j];
+ 				if (line == 0)
+ 					continue;
+ 
+@@ -225,29 +226,28 @@ class GlyphManager (private)
+ 				{
+ 					if (line & (1 << i))
+ 					{
+-						// Font is inverted, so we correct it for conventional renderers
+-						const auto x = (float)(7 - i);
+-						const auto y = (float)(15 - j);
+-						result.emplace_back(x, y);
++						//Font is inverted, so we correct it for conventional renderers
++						float x = (float)(7 - i);
++						float y = (float)(15 - j);
++						result.push_back({ x, y });
+ 					}
+ 				}
+ 			}
+ 
+-			entry.points_count = (u32)result.size() - entry.glyph_point_offset;
++			text.points_count = (u32)result.size() - text.glyph_point_offset;
+ 		}
+ 
+ 		return result;
+ 	}
+ 
+-	std::unordered_map<u8, std::pair<u32, u32>> get_glyph_offsets() const
++	std::unordered_map<u8, std::pair<u32, u32>> get_glyph_offsets()
+ 	{
+ 		std::unordered_map<u8, std::pair<u32, u32>> result = {};
+-
+-		for (const auto &entry : glyph_map)
++		for (auto &entry : glyph_map)
+ 		{
+-			result[entry.character] = std::make_pair(entry.glyph_point_offset, entry.points_count);
++			result[entry.second.character] = std::make_pair(entry.second.glyph_point_offset, entry.second.points_count);
+ 		}
+ 
+ 		return result;
+ 	}
+-};
++};
+\ No newline at end of file

Added: head/emulators/rpcs3/files/patch-rpcs3_Emu_RSX_VK_VulkanAPI.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/rpcs3/files/patch-rpcs3_Emu_RSX_VK_VulkanAPI.h	Tue Jun 11 00:50:56 2019	(r503930)
@@ -0,0 +1,31 @@
+Revert https://github.com/RPCS3/rpcs3/commit/39fa1d7031e3 to unbreak
+with devel/vulkan-headers < 1.1.96
+
+In file included from rpcs3/Emu/RSX/VK/VKFormats.cpp:2:
+In file included from rpcs3/Emu/RSX/VK/VKFormats.h:2:
+rpcs3/Emu/RSX/VK/VKHelpers.h:603:5: error: unknown type name 'VkPhysicalDeviceFloat16Int8FeaturesKHR'; did you mean 'VkPhysicalDeviceMultiviewFeaturesKHR'?
+                                VkPhysicalDeviceFloat16Int8FeaturesKHR shader_support_info{};
+                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+--- rpcs3/Emu/RSX/VK/VulkanAPI.h.orig	2019-06-10 11:57:03 UTC
++++ rpcs3/Emu/RSX/VK/VulkanAPI.h
+@@ -14,6 +14,19 @@
+ #include "define_new_memleakdetect.h"
+ #include "Utilities/types.h"
+ 
++#if VK_HEADER_VERSION < 95
++
++typedef struct VkPhysicalDeviceFloat16Int8FeaturesKHR {
++    VkStructureType    sType;
++    void*              pNext;
++    VkBool32           shaderFloat16;
++    VkBool32           shaderInt8;
++} VkPhysicalDeviceFloat16Int8FeaturesKHR;
++
++#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR VkStructureType(1000082000)
++
++#endif
++
+ namespace vk
+ {
+ 	void init();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906110050.x5B0ouAc086897>