Compare commits

...

No commits in common. 'f37' and 'i9' have entirely different histories.
f37 ... i9

2
.gitignore vendored

@ -1 +1 @@
/libplacebo-*.tar.gz
SOURCES/libplacebo-4.208.0.tar.gz

@ -0,0 +1 @@
619f1fcd604f6601a55fd12d288f29dbecebaa78 SOURCES/libplacebo-4.208.0.tar.gz

@ -1,3 +0,0 @@
# libplacebo
The libplacebo package

@ -0,0 +1,136 @@
From 9b57dbc097d94131266ffea2bfb9101418613aa3 Mon Sep 17 00:00:00 2001
From: tigro <tigro@msvsphere-os.ru>
Date: Tue, 16 Jan 2024 16:53:19 +0300
Subject: [PATCH] Fix build on vulkan-headers 1.3.241
---
src/vulkan/utils_gen.py | 86 ++++++++++++++++++++++++++---------------
1 file changed, 55 insertions(+), 31 deletions(-)
diff --git a/src/vulkan/utils_gen.py b/src/vulkan/utils_gen.py
index fab43af..39ad4f0 100644
--- a/src/vulkan/utils_gen.py
+++ b/src/vulkan/utils_gen.py
@@ -127,56 +127,80 @@ class Obj(object):
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
-def findall_enum(registry, name):
- for e in registry.iterfind('enums[@name="{0}"]/enum'.format(name)):
- if not 'alias' in e.attrib:
- yield e
- for e in registry.iterfind('.//enum[@extends="{0}"]'.format(name)):
- # ext 289 is a non-existing extension that defines some names for
- # proprietary downstream consumers, causes problems unless excluded
- if e.attrib.get('extnumber', '0') == '289':
- continue
- # some other extensions contain reserved identifiers that generally
- # translate to compile failures
- if 'RESERVED' in e.attrib['name']:
- continue
- if not 'alias' in e.attrib:
- yield e
+class VkXML(ET.ElementTree):
+ def blacklist_block(self, req):
+ for t in req.iterfind('type'):
+ self.blacklist_types.add(t.attrib['name'])
+ for e in req.iterfind('enum'):
+ self.blacklist_enums.add(e.attrib['name'])
+
+ def __init__(self, *args, **kwargs):
+
+ super().__init__(*args, **kwargs)
+ self.blacklist_types = set()
+ self.blacklist_enums = set()
+
+ for f in self.iterfind('feature'):
+ # Feature block for non-Vulkan API
+ if not 'vulkan' in f.attrib['api'].split(','):
+ for r in f.iterfind('require'):
+ self.blacklist_block(r)
+
+ for e in self.iterfind('extensions/extension'):
+ # Entire extension is unsupported on vulkan or platform-specifid
+ if not 'vulkan' in e.attrib['supported'].split(',') or 'platform' in e.attrib:
+ for r in e.iterfind('require'):
+ self.blacklist_block(r)
+ continue
+
+ # Only individual <require> blocks are API-specific
+ for r in e.iterfind('require[@api]'):
+ if not 'vulkan' in r.attrib['api'].split(','):
+ self.blacklist_block(r)
+
+ def findall_enum(self, name):
+ for e in self.iterfind('enums[@name="{0}"]/enum'.format(name)):
+ if not 'alias' in e.attrib:
+ if not e.attrib['name'] in self.blacklist_enums:
+ yield e
+ for e in self.iterfind('.//enum[@extends="{0}"]'.format(name)):
+ if not 'alias' in e.attrib:
+ if not e.attrib['name'] in self.blacklist_enums:
+ yield e
+
+ def findall_type(self, category):
+ for t in self.iterfind('types/type[@category="{0}"]'.format(category)):
+ name = t.attrib.get('name') or t.find('name').text
+ if name in self.blacklist_types:
+ continue
+ yield t
+
def get_vkenum(registry, enum):
- for e in findall_enum(registry, enum):
+ for e in registry.findall_enum(enum):
yield e.attrib['name']
def get_vkobjects(registry):
- for t in registry.iterfind('types/type[@category="handle"]'):
+ for t in registry.findall_type('handle'):
if 'objtypeenum' in t.attrib:
yield Obj(enum = t.attrib['objtypeenum'],
name = t.find('name').text)
def get_vkstructs(registry):
- for e in registry.iterfind('types/type[@category="struct"]'):
- # Strings for platform-specific crap we want to blacklist as they will
- # most likely cause build failures
- blacklist_strs = [
- 'ANDROID', 'Surface', 'Win32', 'D3D12', 'GGP', 'FUCHSIA', 'Metal',
- ]
-
- if any([ str in e.attrib['name'] for str in blacklist_strs ]):
- continue
-
+ for t in registry.findall_type('struct'):
stype = None
- for m in e.iterfind('member'):
+ for m in t.iterfind('member'):
if m.find('name').text == 'sType':
stype = m
break
if stype and 'values' in stype.attrib:
yield Obj(stype = stype.attrib['values'],
- name = e.attrib['name'])
+ name = t.attrib['name'])
def get_vkaccess(registry):
access = Obj(read = 0, write = 0)
- for e in findall_enum(registry, 'VkAccessFlagBits'):
+ for e in registry.findall_enum('VkAccessFlagBits'):
if '_READ_' in e.attrib['name']:
access.read |= 1 << int(e.attrib['bitpos'])
if '_WRITE_' in e.attrib['name']:
@@ -212,7 +236,7 @@ if __name__ == '__main__':
if not xmlfile or xmlfile == '':
xmlfile = find_registry_xml(datadir)
- registry = ET.parse(xmlfile)
+ registry = VkXML(ET.parse(xmlfile))
with open(outfile, 'w') as f:
f.write(TEMPLATE.render(
vkresults = get_vkenum(registry, 'VkResult'),
--
2.43.0

@ -0,0 +1,291 @@
diff -urN libplacebo-4.208.0.orig/src/glsl/glslang.cc libplacebo-4.208.0/src/glsl/glslang.cc
--- libplacebo-4.208.0.orig/src/glsl/glslang.cc 2023-07-18 15:36:42.938251318 +0300
+++ libplacebo-4.208.0/src/glsl/glslang.cc 2023-07-18 15:37:30.125560280 +0300
@@ -111,114 +111,4 @@
delete shader;
delete prog;
return res;
-}
-
-// Taken from glslang's examples, which apparently generally bases the choices
-// on OpenGL specification limits
-const TBuiltInResource DefaultTBuiltInResource = {
- /* .MaxLights = */ 32,
- /* .MaxClipPlanes = */ 6,
- /* .MaxTextureUnits = */ 32,
- /* .MaxTextureCoords = */ 32,
- /* .MaxVertexAttribs = */ 64,
- /* .MaxVertexUniformComponents = */ 4096,
- /* .MaxVaryingFloats = */ 64,
- /* .MaxVertexTextureImageUnits = */ 32,
- /* .MaxCombinedTextureImageUnits = */ 80,
- /* .MaxTextureImageUnits = */ 32,
- /* .MaxFragmentUniformComponents = */ 4096,
- /* .MaxDrawBuffers = */ 32,
- /* .MaxVertexUniformVectors = */ 128,
- /* .MaxVaryingVectors = */ 8,
- /* .MaxFragmentUniformVectors = */ 16,
- /* .MaxVertexOutputVectors = */ 16,
- /* .MaxFragmentInputVectors = */ 15,
- /* .MinProgramTexelOffset = */ -8,
- /* .MaxProgramTexelOffset = */ 7,
- /* .MaxClipDistances = */ 8,
- /* .MaxComputeWorkGroupCountX = */ 65535,
- /* .MaxComputeWorkGroupCountY = */ 65535,
- /* .MaxComputeWorkGroupCountZ = */ 65535,
- /* .MaxComputeWorkGroupSizeX = */ 1024,
- /* .MaxComputeWorkGroupSizeY = */ 1024,
- /* .MaxComputeWorkGroupSizeZ = */ 64,
- /* .MaxComputeUniformComponents = */ 1024,
- /* .MaxComputeTextureImageUnits = */ 16,
- /* .MaxComputeImageUniforms = */ 8,
- /* .MaxComputeAtomicCounters = */ 8,
- /* .MaxComputeAtomicCounterBuffers = */ 1,
- /* .MaxVaryingComponents = */ 60,
- /* .MaxVertexOutputComponents = */ 64,
- /* .MaxGeometryInputComponents = */ 64,
- /* .MaxGeometryOutputComponents = */ 128,
- /* .MaxFragmentInputComponents = */ 128,
- /* .MaxImageUnits = */ 8,
- /* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8,
- /* .MaxCombinedShaderOutputResources = */ 8,
- /* .MaxImageSamples = */ 0,
- /* .MaxVertexImageUniforms = */ 0,
- /* .MaxTessControlImageUniforms = */ 0,
- /* .MaxTessEvaluationImageUniforms = */ 0,
- /* .MaxGeometryImageUniforms = */ 0,
- /* .MaxFragmentImageUniforms = */ 8,
- /* .MaxCombinedImageUniforms = */ 8,
- /* .MaxGeometryTextureImageUnits = */ 16,
- /* .MaxGeometryOutputVertices = */ 256,
- /* .MaxGeometryTotalOutputComponents = */ 1024,
- /* .MaxGeometryUniformComponents = */ 1024,
- /* .MaxGeometryVaryingComponents = */ 64,
- /* .MaxTessControlInputComponents = */ 128,
- /* .MaxTessControlOutputComponents = */ 128,
- /* .MaxTessControlTextureImageUnits = */ 16,
- /* .MaxTessControlUniformComponents = */ 1024,
- /* .MaxTessControlTotalOutputComponents = */ 4096,
- /* .MaxTessEvaluationInputComponents = */ 128,
- /* .MaxTessEvaluationOutputComponents = */ 128,
- /* .MaxTessEvaluationTextureImageUnits = */ 16,
- /* .MaxTessEvaluationUniformComponents = */ 1024,
- /* .MaxTessPatchComponents = */ 120,
- /* .MaxPatchVertices = */ 32,
- /* .MaxTessGenLevel = */ 64,
- /* .MaxViewports = */ 16,
- /* .MaxVertexAtomicCounters = */ 0,
- /* .MaxTessControlAtomicCounters = */ 0,
- /* .MaxTessEvaluationAtomicCounters = */ 0,
- /* .MaxGeometryAtomicCounters = */ 0,
- /* .MaxFragmentAtomicCounters = */ 8,
- /* .MaxCombinedAtomicCounters = */ 8,
- /* .MaxAtomicCounterBindings = */ 1,
- /* .MaxVertexAtomicCounterBuffers = */ 0,
- /* .MaxTessControlAtomicCounterBuffers = */ 0,
- /* .MaxTessEvaluationAtomicCounterBuffers = */ 0,
- /* .MaxGeometryAtomicCounterBuffers = */ 0,
- /* .MaxFragmentAtomicCounterBuffers = */ 1,
- /* .MaxCombinedAtomicCounterBuffers = */ 1,
- /* .MaxAtomicCounterBufferSize = */ 16384,
- /* .MaxTransformFeedbackBuffers = */ 4,
- /* .MaxTransformFeedbackInterleavedComponents = */ 64,
- /* .MaxCullDistances = */ 8,
- /* .MaxCombinedClipAndCullDistances = */ 8,
- /* .MaxSamples = */ 4,
- /* .maxMeshOutputVerticesNV = */ 256,
- /* .maxMeshOutputPrimitivesNV = */ 512,
- /* .maxMeshWorkGroupSizeX_NV = */ 32,
- /* .maxMeshWorkGroupSizeY_NV = */ 1,
- /* .maxMeshWorkGroupSizeZ_NV = */ 1,
- /* .maxTaskWorkGroupSizeX_NV = */ 32,
- /* .maxTaskWorkGroupSizeY_NV = */ 1,
- /* .maxTaskWorkGroupSizeZ_NV = */ 1,
- /* .maxMeshViewCountNV = */ 4,
- /* .maxDualSourceDrawBuffersEXT = */ 1,
-
- /* .limits = */ {
- /* .nonInductiveForLoops = */ 1,
- /* .whileLoops = */ 1,
- /* .doWhileLoops = */ 1,
- /* .generalUniformIndexing = */ 1,
- /* .generalAttributeMatrixVectorIndexing = */ 1,
- /* .generalVaryingIndexing = */ 1,
- /* .generalSamplerIndexing = */ 1,
- /* .generalVariableIndexing = */ 1,
- /* .generalConstantMatrixVectorIndexing = */ 1,
- }
-};
+}
\ В конце файла нет новой строки
diff -urN libplacebo-4.208.0.orig/src/glsl/glslang.h libplacebo-4.208.0/src/glsl/glslang.h
--- libplacebo-4.208.0.orig/src/glsl/glslang.h 2023-07-18 15:36:42.938251318 +0300
+++ libplacebo-4.208.0/src/glsl/glslang.h 2023-07-18 15:39:10.850085233 +0300
@@ -20,6 +20,10 @@
#include <stdlib.h>
#include <stdbool.h>
+typedef struct TLimits TLimits;
+typedef struct TBuiltInResource TBuiltInResource;
+#include <glslang/Include/ResourceLimits.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -45,6 +49,8 @@
enum glsl_shader_stage stage,
const char *shader);
+extern const TBuiltInResource DefaultTBuiltInResource;
+
#ifdef __cplusplus
}
#endif
diff -urN libplacebo-4.208.0.orig/src/glsl/glslang_resources.c libplacebo-4.208.0/src/glsl/glslang_resources.c
--- libplacebo-4.208.0.orig/src/glsl/glslang_resources.c 1970-01-01 03:00:00.000000000 +0300
+++ libplacebo-4.208.0/src/glsl/glslang_resources.c 2023-07-18 15:38:30.555675322 +0300
@@ -0,0 +1,133 @@
+/*
+ * This file is part of libplacebo.
+ *
+ * libplacebo is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * libplacebo is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with libplacebo. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "glslang.h"
+
+// Taken from glslang's examples, which apparently generally bases the choices
+// on OpenGL specification limits
+//
+// Note: This lives in a separate file so we can compile this struct using C99
+// designated initializers instead of using C++ struct initializers, because
+// the latter will break on every upstream struct extension.
+const TBuiltInResource DefaultTBuiltInResource = {
+ /* .MaxLights = */ 32,
+ /* .MaxClipPlanes = */ 6,
+ /* .MaxTextureUnits = */ 32,
+ /* .MaxTextureCoords = */ 32,
+ /* .MaxVertexAttribs = */ 64,
+ /* .MaxVertexUniformComponents = */ 4096,
+ /* .MaxVaryingFloats = */ 64,
+ /* .MaxVertexTextureImageUnits = */ 32,
+ /* .MaxCombinedTextureImageUnits = */ 80,
+ /* .MaxTextureImageUnits = */ 32,
+ /* .MaxFragmentUniformComponents = */ 4096,
+ /* .MaxDrawBuffers = */ 32,
+ /* .MaxVertexUniformVectors = */ 128,
+ /* .MaxVaryingVectors = */ 8,
+ /* .MaxFragmentUniformVectors = */ 16,
+ /* .MaxVertexOutputVectors = */ 16,
+ /* .MaxFragmentInputVectors = */ 15,
+ /* .MinProgramTexelOffset = */ -8,
+ /* .MaxProgramTexelOffset = */ 7,
+ /* .MaxClipDistances = */ 8,
+ /* .MaxComputeWorkGroupCountX = */ 65535,
+ /* .MaxComputeWorkGroupCountY = */ 65535,
+ /* .MaxComputeWorkGroupCountZ = */ 65535,
+ /* .MaxComputeWorkGroupSizeX = */ 1024,
+ /* .MaxComputeWorkGroupSizeY = */ 1024,
+ /* .MaxComputeWorkGroupSizeZ = */ 64,
+ /* .MaxComputeUniformComponents = */ 1024,
+ /* .MaxComputeTextureImageUnits = */ 16,
+ /* .MaxComputeImageUniforms = */ 8,
+ /* .MaxComputeAtomicCounters = */ 8,
+ /* .MaxComputeAtomicCounterBuffers = */ 1,
+ /* .MaxVaryingComponents = */ 60,
+ /* .MaxVertexOutputComponents = */ 64,
+ /* .MaxGeometryInputComponents = */ 64,
+ /* .MaxGeometryOutputComponents = */ 128,
+ /* .MaxFragmentInputComponents = */ 128,
+ /* .MaxImageUnits = */ 8,
+ /* .MaxCombinedImageUnitsAndFragmentOutputs = */ 8,
+ /* .MaxCombinedShaderOutputResources = */ 8,
+ /* .MaxImageSamples = */ 0,
+ /* .MaxVertexImageUniforms = */ 0,
+ /* .MaxTessControlImageUniforms = */ 0,
+ /* .MaxTessEvaluationImageUniforms = */ 0,
+ /* .MaxGeometryImageUniforms = */ 0,
+ /* .MaxFragmentImageUniforms = */ 8,
+ /* .MaxCombinedImageUniforms = */ 8,
+ /* .MaxGeometryTextureImageUnits = */ 16,
+ /* .MaxGeometryOutputVertices = */ 256,
+ /* .MaxGeometryTotalOutputComponents = */ 1024,
+ /* .MaxGeometryUniformComponents = */ 1024,
+ /* .MaxGeometryVaryingComponents = */ 64,
+ /* .MaxTessControlInputComponents = */ 128,
+ /* .MaxTessControlOutputComponents = */ 128,
+ /* .MaxTessControlTextureImageUnits = */ 16,
+ /* .MaxTessControlUniformComponents = */ 1024,
+ /* .MaxTessControlTotalOutputComponents = */ 4096,
+ /* .MaxTessEvaluationInputComponents = */ 128,
+ /* .MaxTessEvaluationOutputComponents = */ 128,
+ /* .MaxTessEvaluationTextureImageUnits = */ 16,
+ /* .MaxTessEvaluationUniformComponents = */ 1024,
+ /* .MaxTessPatchComponents = */ 120,
+ /* .MaxPatchVertices = */ 32,
+ /* .MaxTessGenLevel = */ 64,
+ /* .MaxViewports = */ 16,
+ /* .MaxVertexAtomicCounters = */ 0,
+ /* .MaxTessControlAtomicCounters = */ 0,
+ /* .MaxTessEvaluationAtomicCounters = */ 0,
+ /* .MaxGeometryAtomicCounters = */ 0,
+ /* .MaxFragmentAtomicCounters = */ 8,
+ /* .MaxCombinedAtomicCounters = */ 8,
+ /* .MaxAtomicCounterBindings = */ 1,
+ /* .MaxVertexAtomicCounterBuffers = */ 0,
+ /* .MaxTessControlAtomicCounterBuffers = */ 0,
+ /* .MaxTessEvaluationAtomicCounterBuffers = */ 0,
+ /* .MaxGeometryAtomicCounterBuffers = */ 0,
+ /* .MaxFragmentAtomicCounterBuffers = */ 1,
+ /* .MaxCombinedAtomicCounterBuffers = */ 1,
+ /* .MaxAtomicCounterBufferSize = */ 16384,
+ /* .MaxTransformFeedbackBuffers = */ 4,
+ /* .MaxTransformFeedbackInterleavedComponents = */ 64,
+ /* .MaxCullDistances = */ 8,
+ /* .MaxCombinedClipAndCullDistances = */ 8,
+ /* .MaxSamples = */ 4,
+ /* .maxMeshOutputVerticesNV = */ 256,
+ /* .maxMeshOutputPrimitivesNV = */ 512,
+ /* .maxMeshWorkGroupSizeX_NV = */ 32,
+ /* .maxMeshWorkGroupSizeY_NV = */ 1,
+ /* .maxMeshWorkGroupSizeZ_NV = */ 1,
+ /* .maxTaskWorkGroupSizeX_NV = */ 32,
+ /* .maxTaskWorkGroupSizeY_NV = */ 1,
+ /* .maxTaskWorkGroupSizeZ_NV = */ 1,
+ /* .maxMeshViewCountNV = */ 4,
+ /* .maxDualSourceDrawBuffersEXT = */ 1,
+
+ /* .limits = */ {
+ /* .nonInductiveForLoops = */ 1,
+ /* .whileLoops = */ 1,
+ /* .doWhileLoops = */ 1,
+ /* .generalUniformIndexing = */ 1,
+ /* .generalAttributeMatrixVectorIndexing = */ 1,
+ /* .generalVaryingIndexing = */ 1,
+ /* .generalSamplerIndexing = */ 1,
+ /* .generalVariableIndexing = */ 1,
+ /* .generalConstantMatrixVectorIndexing = */ 1,
+ }
+};
+
diff -urN libplacebo-4.208.0.orig/src/meson.build libplacebo-4.208.0/src/meson.build
--- libplacebo-4.208.0.orig/src/meson.build 2023-07-18 15:36:42.940251289 +0300
+++ libplacebo-4.208.0/src/meson.build 2023-07-18 15:39:41.162641326 +0300
@@ -224,6 +224,7 @@
'name': 'glslang',
'deps': glslang,
'srcs': [ 'glsl/glslang.cc',
+ 'glsl/glslang_resources.c',
'glsl/spirv_glslang.c',
],
}, {

@ -2,12 +2,14 @@
Name: libplacebo
Version: 4.208.0
Release: 1%{?dist}
Release: 1%{?dist}.inferit
Summary: Reusable library for GPU-accelerated video/image rendering primitives
License: LGPLv2+
URL: https://github.com/haasn/libplacebo
Source0: %{url}/archive/v%{version}%{?prerelease}/%{name}-%{version}%{?prerelease}.tar.gz
Patch0: 0001-move-resources-declaration-to-c-file.patch
Patch1: 0001-Fix-build-on-vulkan-headers-1.3.241.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@ -75,6 +77,12 @@ developing applications that use %{name}.
%changelog
* Tue Jan 16 2024 Arkady L. Shane <ashejn@msvsphere.ru> - 4.208.0-1.inferit
- Fix build on vulkan-headers 1.3.241
* Tue Jul 18 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 4.208.0-1
- Rebuilt for MSPSphere 9.2
* Wed Aug 10 2022 Nicolas Chauvet <kwizart@gmail.com> - 4.208.0-1
- Update to 4.208.0

@ -1 +0,0 @@
SHA512 (libplacebo-4.208.0.tar.gz) = a460cc1bb75bf34982c1bce0a100b586a90e70d6060ee5cd3f8bbf76b9647a6534c6edfcf6382dcc6847051dc5229d651ea545bd8323161fa9056977fbea688c
Loading…
Cancel
Save