luv

Workshop wiki

tests.lisp

hal/webgpu/wgsl/tests.lisp

system luvcraft/core/test · 4 definitions · on GitHub

in-package#:luvcraft.tests
shader:define-shaderwgsl-position-probe
:stage:vertex:inputs
position:vec4:location0
:outputs
clip-position:vec4:built-in:position
shader:set-outputclip-positionposition
deftestwgsl-is-a-structured-sibling-shader-target
let*
specification
first
wgsl:compile-wgslspecification
source
wgsl:wgsl-document-sourcefirst
ok
ok
eqspecification
wgsl:wgsl-document-specificationfirst
ok
string=source
wgsl:wgsl-document-sourcesecond
ok
search"@vertex"source
ok
search"@builtin(position)"source

The shared graph retains Vulkan's framebuffer-oriented clip Y. The target ABI must undo that convention for WebGPU, as MSL does for Metal.

ok
search"vec4<f32>((stage_in.position).x, -(stage_in.position).y"source
deftestnative-agent-bodies-compile-to-webgpu-overrides
let*
gnome
firstbundles
cat
secondbundles
gnome-fragment
luvcraft.web:body-gallery-bundle-fragmentgnome
cat-fragment
luvcraft.web:body-gallery-bundle-fragmentcat
ok
=2
lengthbundles
ok
string="gnome"
luvcraft.web:web-body-id
luvcraft.web:body-gallery-bundle-bodygnome
ok
string="cat"
luvcraft.web:web-body-id
luvcraft.web:body-gallery-bundle-bodycat
ok
=18
length
wgsl:wgsl-document-overridesgnome-fragment
ok
=8
length
wgsl:wgsl-document-overridescat-fragment
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
shading-follows-hit-guard
sourcemarker
let
guard
search"if ((coverage > 0.0f)) {"source
shading
searchmarkersource
andguardshading
<guardshading
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
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:supersede
write'
:version1:source-revision"abc123def456":captures
: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
:streamstream
let*
application
luvcraft.web:make-luvcraft-web-application:bundlesbundles:showcase-directorydirectory
gallery
showcase
catalog
luvcraft.web:respond-to-web-requestapplication"/bodies/bodies.json"
gallery-js
luvcraft.web:respond-to-web-requestapplication"/bodies/gallery.js"
shader
luvcraft.web:respond-to-web-requestapplication"/bodies/body/gnome/fragment.wgsl"
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