Compare commits
28 Commits
master
..
131b2c5c1c
| Author | SHA1 | Date | |
|---|---|---|---|
| 131b2c5c1c | |||
| 22aa47d73f | |||
| 7de7991bf4 | |||
| 97e747fc61 | |||
| a6806d22da | |||
| 937a516657 | |||
| ad55f52e1e | |||
| 78ab5b8ed6 | |||
| 57f952116d | |||
| fbe3d35c5d | |||
| 0f4da6e594 | |||
| c13d83270b | |||
| 28f8c85a3c | |||
| 7a42bdfbcc | |||
| 5a30d7e50f | |||
| 658868d568 | |||
| 25993bb08c | |||
| 4dcad0843a | |||
| 4f39795e87 | |||
| 7e706ab0fc | |||
| a09c4968c9 | |||
| 0f969b5adb | |||
| c7c2c59dd0 | |||
| 5a6e29dba6 | |||
| f1885f49ec | |||
| b77314401a | |||
| 939aa912ed | |||
| 8b075645e7 |
@@ -1,4 +1,3 @@
|
||||
render/work
|
||||
imagecompare
|
||||
rendertest.script
|
||||
container/Half-Life
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
FROM ubuntu-hlsdk
|
||||
|
||||
# Avoid interactive prompts during package installation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV VULKAN_SDK_VERSION=1.4.341.1
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update && apt-get full-upgrade -y && apt-get autoremove -y
|
||||
|
||||
# Install system dependencies and development packages
|
||||
RUN apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
libsdl2-dev \
|
||||
libfreetype-dev \
|
||||
\
|
||||
# FFmpeg development packages
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libavfilter-dev \
|
||||
libavdevice-dev \
|
||||
libswscale-dev \
|
||||
libswresample-dev \
|
||||
libpostproc-dev \
|
||||
ffmpeg \
|
||||
\
|
||||
# Running render tests
|
||||
weston \
|
||||
libgl1-mesa-dri \
|
||||
mesa-vulkan-drivers \
|
||||
libvulkan1 \
|
||||
imagemagick
|
||||
|
||||
# Install Vulkan SDK runtime dependencies only
|
||||
#RUN apt-get update && apt-get install -y \
|
||||
# libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev
|
||||
|
||||
# Install Vulkan SDK
|
||||
RUN mkdir -p /opt/VulkanSDK && wget -qO- \
|
||||
https://sdk.lunarg.com/sdk/download/${VULKAN_SDK_VERSION}/linux/vulkansdk-linux-x86_64-${VULKAN_SDK_VERSION}.tar.xz | \
|
||||
tar -xJ -C /opt/VulkanSDK/
|
||||
|
||||
ENV VULKAN_SDK=/opt/VulkanSDK/${VULKAN_SDK_VERSION}/x86_64
|
||||
ENV PATH=$VULKAN_SDK/bin:$PATH
|
||||
ENV LD_LIBRARY_PATH="$VULKAN_SDK/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
ENV VK_ADD_LAYER_PATH="$VULKAN_SDK/share/vulkan/explicit_layer.d${VK_ADD_LAYER_PATH:+:$VK_ADD_LAYER_PATH}"
|
||||
ENV PKG_CONFIG_PATH="$VULKAN_SDK/share/pkgconfig:$VULKAN_SDK/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
|
||||
|
||||
# Common dev utils
|
||||
RUN apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
ripgrep \
|
||||
less \
|
||||
fd-find
|
||||
|
||||
# Remove extra cache after all the installations
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /build
|
||||
COPY build-and-test.sh /build/
|
||||
|
||||
# Switch to non-root user
|
||||
USER ubuntu
|
||||
|
||||
# Default command
|
||||
WORKDIR /build
|
||||
CMD ["/build/build-and-test.sh"]
|
||||
@@ -1,48 +0,0 @@
|
||||
FROM ubuntu:24.04
|
||||
|
||||
# This cannot reference external dirs, unfortunately
|
||||
ARG HALFLIFE_STEAM_FILES=./Half-Life
|
||||
|
||||
# Copy HL data files
|
||||
RUN mkdir -p /opt/hl && chown ubuntu:ubuntu /opt/hl
|
||||
COPY --chown=ubuntu:ubuntu ${HALFLIFE_STEAM_FILES}/valve /opt/hl/valve
|
||||
COPY --chown=ubuntu:ubuntu ${HALFLIFE_STEAM_FILES}/valve_hd /opt/hl/valve_hd
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install generic build dependencies
|
||||
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
|
||||
\
|
||||
# Build essential utilities
|
||||
ca-certificates \
|
||||
wget \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
python3 \
|
||||
git
|
||||
|
||||
# Build FWGS hlsdk game libs
|
||||
ARG FWGS_HLSDK_REF=ae84bfc0c3598fcff605a7b3bb963abe8ec3e295
|
||||
RUN mkdir -p /build && chown ubuntu:ubuntu /build
|
||||
USER ubuntu
|
||||
RUN cd /build && \
|
||||
git version && \
|
||||
# git > 2.49: git clone --depth 1 --revision ${FWGS_HLSDK_REF} https://github.com/FWGS/hlsdk-portable && \
|
||||
mkdir -p hlsdk-portable && \
|
||||
cd hlsdk-portable && \
|
||||
git init && \
|
||||
git remote add origin https://github.com/FWGS/hlsdk-portable && \
|
||||
git fetch --depth 1 origin ${FWGS_HLSDK_REF} && \
|
||||
git checkout FETCH_HEAD && \
|
||||
./waf \
|
||||
configure -8 -T release \
|
||||
build \
|
||||
install --destdir=/opt/hl
|
||||
|
||||
# Cleanup build files
|
||||
RUN rm -rf /build/hlsdk-portable
|
||||
|
||||
# At this point there's:
|
||||
# /opt/hl with
|
||||
# ./valve
|
||||
# {dlls, cl_dlls} with fwgs/hlsdk libs
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
echo DESTINATION_IS_WRITABLE > /opt/hl/testfile
|
||||
|
||||
XDG_RUNTIME_DIR=/tmp weston \
|
||||
--backend=headless \
|
||||
--renderer=gl \
|
||||
--width=1280 \
|
||||
--height=800 \
|
||||
--socket=wayland-headless &
|
||||
|
||||
build() {
|
||||
pushd /build/xash3d-fwgs
|
||||
./waf configure -T release -8 \
|
||||
build \
|
||||
install --destdir=/opt/hl
|
||||
popd
|
||||
}
|
||||
|
||||
rendertest() {
|
||||
pushd /build/HLRTest/render
|
||||
WAYLAND_DISPLAY=/tmp/wayland-headless ./rendertest.py \
|
||||
--xash-dir /opt/hl \
|
||||
--xash-revision "${XASH3D_REVISION}" \
|
||||
--pbr-revision "${PBR_REVISION}" \
|
||||
--tests-revision "${HLRTEST_REVISION}" \
|
||||
run
|
||||
popd
|
||||
}
|
||||
|
||||
time build
|
||||
time rendertest
|
||||
@@ -1,5 +0,0 @@
|
||||
# Path to https://rtxash.omgwtf.ru/Half-Life-RTX/Half-Life-PBR repo clone (readonly)
|
||||
HALFLIFE_PBR_REPO_DIR=${HOME}/src/Half-Life-PBR
|
||||
|
||||
# Path to https://github.com/w23/xash3d-fwgs/ clone (readonly)
|
||||
XASH3D_RT_REPO_DIR=${HOME}/src/xash3d-fwgs
|
||||
@@ -1,93 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
# just podman things
|
||||
export DBUS_SESSION_BUS_ADDRESS=
|
||||
|
||||
NAME=xash-builder
|
||||
|
||||
HLRTEST_REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
|
||||
|
||||
source .env
|
||||
|
||||
build-image-hlsdk() {
|
||||
podman build -t ubuntu-hlsdk -f Containerfile.hlsdk
|
||||
}
|
||||
|
||||
build-image() {
|
||||
podman build -t ubuntu-xash-builder -f Containerfile
|
||||
}
|
||||
|
||||
build() {
|
||||
build-image-hlsdk
|
||||
build-image
|
||||
}
|
||||
|
||||
git_short() {
|
||||
local dir="${1:-.}"
|
||||
local hash dirty_flag
|
||||
|
||||
# Get short commit hash
|
||||
hash=$(cd "$dir" && git rev-parse --short HEAD 2>/dev/null)
|
||||
|
||||
if [[ -z "$hash" ]]; then
|
||||
echo "Not a git repository" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check for uncommitted changes (staged or unstaged)
|
||||
dirty_flag=$(cd "$dir" && git status --porcelain --untracked-files=no 2>/dev/null)
|
||||
|
||||
if [[ -n "$dirty_flag" ]]; then
|
||||
echo "${hash}-dirty"
|
||||
else
|
||||
echo "$hash"
|
||||
fi
|
||||
}
|
||||
|
||||
render-test() {
|
||||
local OUTPUT="${HLRTEST_REPO_DIR}/render/work"
|
||||
mkdir -p "${OUTPUT}"
|
||||
|
||||
local HLRTEST_REVISION=$(git_short "${HLRTEST_REPO_DIR}")
|
||||
local XASH3D_REVISION=$(git_short "${XASH3D_RT_REPO_DIR}")
|
||||
local PBR_REVISION=$(git_short "${HALFLIFE_PBR_REPO_DIR}")
|
||||
|
||||
# Make sure the image's ubuntu (uid=1000) user can write to the output
|
||||
#chmod -R o+rw "${OUTPUT}"
|
||||
|
||||
podman run -it --rm \
|
||||
--name ${NAME} \
|
||||
--userns=keep-id:uid=1000,gid=1000 \
|
||||
\
|
||||
--cap-drop=ALL \
|
||||
--security-opt=no-new-privileges \
|
||||
--read-only \
|
||||
--tmpfs /tmp \
|
||||
\
|
||||
-e HLRTEST_REVISION="${HLRTEST_REVISION}" \
|
||||
-e XASH3D_REVISION="${XASH3D_REVISION}" \
|
||||
-e PBR_REVISION="${PBR_REVISION}" \
|
||||
\
|
||||
-v /dev/dri/renderD128:/dev/dri/renderD128:ro \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
\
|
||||
-v /opt/hl \
|
||||
-v /home/ubuntu \
|
||||
-v ${HALFLIFE_PBR_REPO_DIR}/valve/pbr:/opt/hl/valve/pbr:ro \
|
||||
-v ${HALFLIFE_PBR_REPO_DIR}/valve/bluenoise:/opt/hl/valve/bluenoise:ro \
|
||||
\
|
||||
-v ${XASH3D_RT_REPO_DIR}:/build/xash3d-fwgs:O \
|
||||
\
|
||||
-v ${HLRTEST_REPO_DIR}:/build/HLRTest:O \
|
||||
-v ${OUTPUT}:/build/HLRTest/render/work \
|
||||
\
|
||||
ubuntu-xash-builder:latest \
|
||||
"$@"
|
||||
}
|
||||
|
||||
shell() {
|
||||
podman exec -it ${NAME} /bin/bash
|
||||
}
|
||||
|
||||
time "$@"
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
imagecompare: imagecompare.c stb_image.h stb_image_write.h Makefile
|
||||
${CC} -O3 -ggdb3 -march=native -Wall -Werror -pedantic -o imagecompare imagecompare.c -lm
|
||||
${CC} -O3 -ggdb3 -march=native -Wall -Werror -pedantic -lm -o imagecompare imagecompare.c
|
||||
|
||||
@@ -358,10 +358,6 @@ body.mini { /* split feature */
|
||||
padding-bottom: 2px;
|
||||
/*padding-bottom: calc(50% - var(--height-image) );*/
|
||||
}
|
||||
#fail_images.vpadding .meta-block:last-child {
|
||||
padding-top: calc(var(--height-image));
|
||||
padding-bottom: calc(var(--height-image));
|
||||
}
|
||||
#fail_images.vpadding .meta-block h3, .meta-block:first-child h3 {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user