void-packages/srcpkgs/renderdoc/patches/compressonator-only-x86.patch
Đoàn Trần Công Danh 103ab731ab srcpkgs/r*: convert patches to -Np1
* runit is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

38 lines
1.4 KiB
Diff

From: Jordan Justen <jordan.l.justen@intel.com>
Date: Wed, 29 Jul 2020 02:26:27 -0700
Subject: replay: Only support compressonator on x86
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
renderdoc/CMakeLists.txt | 2 +-
renderdoc/replay/replay_driver.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
index e3e8c28..59c8937 100644
--- a/renderdoc/CMakeLists.txt
+++ b/renderdoc/CMakeLists.txt
@@ -342,7 +342,7 @@ elseif(UNIX)
os/posix/posix_specific.h)
endif()
-if(NOT ANDROID)
+if(RENDERDOC_X86_PROC_FAMILY)
list(APPEND sources
3rdparty/compressonator/BC1_Encode_kernel.cpp
3rdparty/compressonator/BC2_Encode_kernel.cpp
diff --git a/renderdoc/replay/replay_driver.cpp b/renderdoc/replay/replay_driver.cpp
index a704726..7f3387f 100644
--- a/renderdoc/replay/replay_driver.cpp
+++ b/renderdoc/replay/replay_driver.cpp
@@ -1430,8 +1430,8 @@ bytebuf GetDiscardPattern(DiscardType type, const ResourceFormat &fmt, uint32_t
fmt.type == ResourceFormatType::BC5 || fmt.type == ResourceFormatType::BC6 ||
fmt.type == ResourceFormatType::BC7)
{
-#if ENABLED(RDOC_ANDROID)
- RDCERR("Format %s not supported on android", fmt.Name().c_str());
+#if DISABLED(RDOC_X86_FAMILY)
+ RDCERR("Format %s is only supported on x86", fmt.Name().c_str());
#else
const uint16_t whalf = ConvertToHalf(1000.0f);