hal/webgpu/wgsl/tests.lisp
in-package#:luvcraft.tests
deftestwgsl-is-a-structured-sibling-shader-target
let*
specification
first
wgsl:compile-wgslspecification
second
wgsl:compile-wgslspecification
source
wgsl:wgsl-document-sourcefirst
ok
ok
eqspecification
wgsl:wgsl-document-specificationfirst
ok
ok
search"@vertex"source
ok
search"@builtin(position)"source
ok
search"vec4<f32>((stage_in.position).x, -(stage_in.position).y"source
deftestnative-agent-bodies-compile-to-webgpu-overrides
let*
gnome
firstbundles
gnome-fragment
luvcraft.web:body-gallery-bundle-fragmentgnome
cat-fragment
luvcraft.web:body-gallery-bundle-fragmentcat
ok
ok
ok
null
wgsl:wgsl-document-overrides
luvcraft.web:body-gallery-bundle-vertexgnome
ok
search"@location(2) figure_facing: vec4<f32>"
wgsl:wgsl-document-source
luvcraft.web:body-gallery-bundle-vertexgnome
ok
search"override knob_gnome_stature: f32 = 0.8f;"
wgsl:wgsl-document-sourcegnome-fragment
ok
search"override knob_cat_stripe_strength: f32 = 0.72f;"
wgsl:wgsl-document-sourcecat-fragment
dolist
source
list
wgsl:wgsl-document-sourcegnome-fragment
wgsl:wgsl-document-sourcecat-fragment
ok
search"break;"source
flet
ok
shading-follows-hit-guard
wgsl:wgsl-document-sourcegnome-fragment
"let gnome_shaded_color"ok
shading-follows-hit-guard
wgsl:wgsl-document-sourcecat-fragment
"let cat_shaded_color"let
json
ok
char=#\{
charjson0
ok
search"\"statureKnob\":\"gnome-stature\""json
ok
search"\"identifier\":\"knob_cat_tail_reach\""json
deftestluvcraft-web-mounts-its-semantic-pages
let
directory
uiop:ensure-directory-pathname
merge-pathnames"luvcraft-showcase-test/"
uiop:temporary-directory
unwind-protect
progn
ensure-directories-existdirectory
with-open-file
stream
merge-pathnames"manifest.sexp"directory
:direction:output:if-exists:supersedewrite'
:version1:source-revision"abc123def456":captures
:streamstream:name"proposal-still":figure"Y7X7WK":kind:image:file"Y7X7WK-proposal-still.png":layout:landscape:width1200:height800:variants
:file"Y7X7WK-proposal-still-480w.webp":type"image/webp":width480:height320
:file"Y7X7WK-proposal-still-768w.webp":type"image/webp":width768:height512
:name"proposal-orbit":figure"Y7X7WK":kind:video:file"Y7X7WK-proposal-orbit.mp4":layout:portrait:width720:height1280:poster
:file"Y7X7WK-proposal-orbit-poster-480w.webp":type"image/webp":width480:height854
let*
application
index
gallery
showcase
catalog
gallery-js
shader
missing
ok
string="200 OK"
luvcraft.web:web-response-statusindex
ok
search"href=\"/bodies/\""
luvcraft.web:web-response-bodyindex
ok
search"href=\"/showcase/\""
luvcraft.web:web-response-bodyindex
ok
string="200 OK"
luvcraft.web:web-response-statusgallery
ok
search"/bodies/gallery.js"
luvcraft.web:web-response-bodygallery
ok
search"\"vertexUrl\":\"\\/bodies\\/body\\/gnome\\/vertex.wgsl\""
luvcraft.web:web-response-bodycatalog
ok
search"const FRAME_INTERVAL = 1000 / 60;"
luvcraft.web:web-response-bodygallery-js
ok
search"const RENDER_SCALE = 1;"
luvcraft.web:web-response-bodygallery-js
ok
search"if (!cameraBufferDirty) return;"
luvcraft.web:web-response-bodygallery-js
ok
search"new URLSearchParams(location.hash.slice(1))"
luvcraft.web:web-response-bodygallery-js
ok
search"parameters.set(knob.name"
luvcraft.web:web-response-bodygallery-js
ok
search"history.replaceState(null, \"\", `#${parameters}`)"
luvcraft.web:web-response-bodygallery-js
ok
search"@fragment"
luvcraft.web:web-response-bodyshader
ok
search"/showcase/media/Y7X7WK-proposal-still.png"
luvcraft.web:web-response-bodyshowcase
ok
search"src=\"/showcase/media/Y7X7WK-proposal-still-768w.webp\""
luvcraft.web:web-response-bodyshowcase
ok
search"Y7X7WK-proposal-still-480w.webp 480w, /showcase/media/Y7X7WK-proposal-still-768w.webp 768w"
luvcraft.web:web-response-bodyshowcase
ok
search"sizes=\"(max-width: 59.5rem)"
luvcraft.web:web-response-bodyshowcase
ok
search"title=\"Open full-resolution image\""
luvcraft.web:web-response-bodyshowcase
ok
search"/showcase/media/Y7X7WK-proposal-orbit.mp4"
luvcraft.web:web-response-bodyshowcase
ok
search"class=portrait><div class=\"media portrait\">"
luvcraft.web:web-response-bodyshowcase
ok
search"preload=none poster=\"/showcase/media/Y7X7WK-proposal-orbit-poster-480w.webp\""
luvcraft.web:web-response-bodyshowcase
ok
search".media.portrait img,.media.portrait video{object-fit:contain}"
luvcraft.web:web-response-bodyshowcase
ok
search"abc123def456"
luvcraft.web:web-response-bodyshowcase
ok
string="404 Not Found"
luvcraft.web:web-response-statusmissing
uiop:delete-directory-treedirectory:validatet:if-does-not-exist:ignore
defmacro define-shader
(name options &body body)defun compile-wgsl
(specification &key overrides)defclass gnome
A small SDF-rendered garden gnome carrying a WORLD-AGENT.
defclass cat
A sitting SDF-rendered cat carrying the shared embodied WORLD-AGENT surface.
define-arithmetic-operator =
Test whether two compatible scalars are equal.
define-arithmetic-operator and
Logical conjunction of tests and raw truth values.
define-arithmetic-operator <
Test whether one compatible scalar is less than another.
defun body-gallery-json
(&optional (bundles (compile-body-gallery))
(base-path "/bodies"))defun make-luvcraft-web-application
(&key bundles showcase-directory)defgeneric respond-to-web-request
(receiver path)Return a WEB-RESPONSE for PATH from a web application or mounted page.
The shared graph retains Vulkan's framebuffer-oriented clip Y. The target ABI must undo that convention for WebGPU, as MSL does for Metal.