summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2023-09-16 01:32:40 +0000
committerOmar Rizwan <omar@omar.website>2023-09-16 01:32:40 +0000
commit976f92f5faae252a6245b873800d56c44c8a2b05 (patch)
treefaa81836262b28ebb5b0d327c6972961e8c35b87 /virtual-programs
parentVulkan works on folk0 (diff)
downloadfolk-976f92f5faae252a6245b873800d56c44c8a2b05.tar.gz
folk-976f92f5faae252a6245b873800d56c44c8a2b05.zip
WIP: Stub in GPU into Folk. Doesn't draw yet
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/display.folk31
1 files changed, 25 insertions, 6 deletions
diff --git a/virtual-programs/display.folk b/virtual-programs/display.folk
index 674cf1f7..7d4f47b6 100644
--- a/virtual-programs/display.folk
+++ b/virtual-programs/display.folk
@@ -38,8 +38,25 @@ namespace eval ::Display {
}
On process {
- source pi/Display.tcl
- Display::init
+ source pi/Gpu.tcl
+ Gpu::init
+
+ namespace eval Display {
+ proc start {} {}
+
+ proc stroke {points width color} {
+
+ }
+ proc circle {x y radius thickness color} {}
+ proc text {x y scale text radians} {}
+ proc fillTriangle {args} {}
+ proc fillQuad {args} {}
+ proc fillPolygon {args} {}
+ proc image {x y im radians {scale 1.0}} {}
+
+ proc end {} {}
+ }
+
puts "Display tid: [getTid]"
# TODO: Clean this up. We retract these so that we don't bounce
@@ -77,11 +94,13 @@ On process {
}
set displayCommands [lmap sublist [lsort -command lcomp $displayList] {lindex $sublist 1}]
+ set renderTime [baretime {
+ Display::start
+ foreach command $displayCommands { {*}$command }
+ Display::end
+ }]
- set renderTime [baretime [list foreach command $displayCommands { {*}$command }]]
- set commitTime [baretime commitThenClearStaging]
-
- Commit { Claim the display time is "render $renderTime us + commit $commitTime us ($::stepTime)" }
+ Commit { Claim the display time is "render $renderTime us ($::stepTime)" }
Step
}
}