mojoshader is now part of fna3d and not used elsewhere. input from sthen@
This commit is contained in:
parent
dd60e311fe
commit
a17a827eb9
|
@ -170,7 +170,6 @@
|
|||
SUBDIR += mapivi
|
||||
SUBDIR += mapnik
|
||||
SUBDIR += mhgui
|
||||
SUBDIR += mojoshader
|
||||
SUBDIR += mpeg-lib
|
||||
SUBDIR += mpeg_encode
|
||||
SUBDIR += mscgen
|
||||
|
|
|
@ -3,6 +3,7 @@ V = 22.08
|
|||
COMMENT = 3D graphics library for FNA
|
||||
DISTNAME = fna-${V:S/.//g}
|
||||
PKGNAME = fna3d-${V}
|
||||
REVISION = 0
|
||||
|
||||
SHARED_LIBS = FNA3D 3.1 # 22.01
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
@pkgpath graphics/mojoshader
|
||||
include/FNA3D.h
|
||||
include/FNA3D_Image.h
|
||||
include/FNA3D_SysRenderer.h
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
COMMENT = library to move Direct3D shader calls to OpenGL
|
||||
|
||||
DISTNAME = mojoshader-0.0.0.20211124
|
||||
GH_ACCOUNT = icculus
|
||||
GH_PROJECT = mojoshader
|
||||
GH_COMMIT = 76293ed6d5c4bb33875abb92979309e2797cc6ed
|
||||
EPOCH = 0
|
||||
|
||||
SHARED_LIBS += mojoshader 2.0 # 0.0.0.20211124
|
||||
|
||||
CATEGORIES = graphics
|
||||
MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
|
||||
|
||||
HOMEPAGE = https://icculus.org/mojoshader/
|
||||
|
||||
# zlib
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
COMPILER = base-clang ports-gcc
|
||||
COMPILER_LANGS = c
|
||||
|
||||
WANTLIB += m
|
||||
|
||||
MODULES = devel/cmake
|
||||
|
||||
BUILD_DEPENDS = devel/re2c \
|
||||
devel/sdl2 \
|
||||
graphics/vulkan-headers
|
||||
|
||||
TEST_DEPENDS = security/p5-Digest-SHA1
|
||||
|
||||
# FLIP_VIEWPORT is needed by some FNA games (FEZ if I recall correctly)
|
||||
CONFIGURE_ARGS = -DBUILD_SHARED_LIBS=ON \
|
||||
-DFLIP_VIEWPORT=1 \
|
||||
-DPROFILE_METAL=OFF
|
||||
|
||||
CFLAGS += -I${LOCALBASE}/include
|
||||
|
||||
SUBST_VARS += HG_CHANGESET HG_COMMIT
|
||||
|
||||
.include <bsd.port.arch.mk>
|
||||
.if !${PROPERTIES:Mclang}
|
||||
CFLAGS += -std=gnu99
|
||||
.endif
|
||||
|
||||
do-gen:
|
||||
${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
|
||||
|
||||
# No upstream install target
|
||||
do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/mojoshader*.h ${PREFIX}/include
|
||||
${INSTALL_DATA} ${WRKBUILD}/libmojoshader.so.${LIBmojoshader_VERSION} \
|
||||
${PREFIX}/lib
|
||||
|
||||
.include <bsd.port.mk>
|
|
@ -1,2 +0,0 @@
|
|||
SHA256 (mojoshader-0.0.0.20211124-76293ed6.tar.gz) = mFw9ui9ziphuTh+H0dw2JGc/rq0i+cIXGRN81jQjcYY=
|
||||
SIZE (mojoshader-0.0.0.20211124-76293ed6.tar.gz) = 477384
|
|
@ -1,23 +0,0 @@
|
|||
fix incomplete function signatures
|
||||
|
||||
Index: mojoshader_compiler.c
|
||||
--- mojoshader_compiler.c.orig
|
||||
+++ mojoshader_compiler.c
|
||||
@@ -475,7 +475,7 @@ static void pop_symbol(Context *ctx, SymbolMap *map)
|
||||
if (!item)
|
||||
return;
|
||||
if (item->symbol)
|
||||
- hash_remove(map->hash, item->symbol);
|
||||
+ hash_remove(map->hash, item->symbol, ctx);
|
||||
map->scope = item->next;
|
||||
Free(ctx, item);
|
||||
} // pop_symbol
|
||||
@@ -524,7 +524,7 @@ static void destroy_symbolmap(Context *ctx, SymbolMap
|
||||
{
|
||||
while (map->scope)
|
||||
pop_symbol(ctx, map);
|
||||
- hash_destroy(map->hash);
|
||||
+ hash_destroy(map->hash, ctx);
|
||||
} // destroy_symbolmap
|
||||
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
re-add MOJOSHADER_glProgramViewportFlip() for backwards compatibility.
|
||||
Was removed by upstream in changeset 1210
|
||||
(https://hg.icculus.org/icculus/mojoshader/rev/c586d4590241)
|
||||
|
||||
Index: mojoshader_opengl.c
|
||||
--- mojoshader_opengl.c.orig
|
||||
+++ mojoshader_opengl.c
|
||||
@@ -2681,6 +2681,27 @@ static inline GLenum opengl_attr_type(const MOJOSHADER
|
||||
return GL_NONE; // oh well. Raises a GL error later.
|
||||
} // opengl_attr_type
|
||||
|
||||
+#ifdef MOJOSHADER_FLIP_RENDERTARGET
|
||||
+
|
||||
+
|
||||
+void MOJOSHADER_glProgramViewportFlip(int flip)
|
||||
+{
|
||||
+ assert(ctx->bound_program->vs_flip_loc != -1);
|
||||
+
|
||||
+ /* Some compilers require that vpFlip be a float value, rather than int.
|
||||
+ * However, there's no real reason for it to be a float in the API, so we
|
||||
+ * do a cast in here. That's not so bad, right...?
|
||||
+ * -flibit
|
||||
+ */
|
||||
+ if (flip != ctx->bound_program->current_flip)
|
||||
+ {
|
||||
+ ctx->glUniform1f(ctx->bound_program->vs_flip_loc, (float) flip);
|
||||
+ ctx->bound_program->current_flip = flip;
|
||||
+ } // if
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
|
||||
int MOJOSHADER_glGetVertexAttribLocation(MOJOSHADER_usage usage, int index)
|
||||
{
|
|
@ -1,14 +0,0 @@
|
|||
MojoShader is a library to work with Direct3D shaders on alternate 3D
|
||||
APIs and non-Windows platforms. The primary motivation is moving shaders
|
||||
to OpenGL languages on the fly. The developer deals with "profiles" that
|
||||
represent various target languages, such as GLSL or ARB_*_program.
|
||||
|
||||
This allows a developer to manage one set of shaders, presumably written
|
||||
in Direct3D HLSL, and use them across multiple rendering backends. This
|
||||
also means that the developer only has to worry about one (offline)
|
||||
compiler to manage program complexity, while MojoShader itself deals
|
||||
with the reduced complexity of the bytecode at runtime.
|
||||
|
||||
MojoShader provides both a simple API to convert bytecode to various
|
||||
profiles, and (optionally) basic glue to rendering APIs to abstract the
|
||||
management of the shaders at runtime.
|
|
@ -1,7 +0,0 @@
|
|||
include/mojoshader.h
|
||||
include/mojoshader_effects.h
|
||||
include/mojoshader_internal.h
|
||||
include/mojoshader_parser_hlsl.h
|
||||
include/mojoshader_version.h
|
||||
include/mojoshader_vulkan_vkfuncs.h
|
||||
@lib lib/libmojoshader.so.${LIBmojoshader_VERSION}
|
Loading…
Reference in New Issue
Block a user