Skip to content

Commit

Permalink
tbd vfs standalone app test
Browse files Browse the repository at this point in the history
  • Loading branch information
rdw-software committed Feb 28, 2024
1 parent 0bc2856 commit 9dc3683
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ function BasicTriangleDrawingPipeline:Construct(wgpuDeviceHandle, textureFormatI
return instance
end

local vfs = require("vfs")

function BasicTriangleDrawingPipeline:CreateShaderModule(wgpuDeviceHandle)
local shaderCodeDescriptor = new("WGPUShaderModuleWGSLDescriptor", {
code = C_FileSystem.ReadFile(self.WGSL_SHADER_SOURCE_LOCATION),
code = vfs.extract(self.WGSL_SHADER_SOURCE_LOCATION) or C_FileSystem.ReadFile(self.WGSL_SHADER_SOURCE_LOCATION),
chain = {
sType = ffi.C.WGPUSType_ShaderModuleWGSLDescriptor,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ function GroundMeshDrawingPipeline:Construct(wgpuDeviceHandle, textureFormatID)

return instance
end

local vfs = require("vfs")
function GroundMeshDrawingPipeline:CreateShaderModule(wgpuDeviceHandle)
local shaderCodeDescriptor = new("WGPUShaderModuleWGSLDescriptor", {
code = C_FileSystem.ReadFile(self.WGSL_SHADER_SOURCE_LOCATION),
code = vfs.extract(self.WGSL_SHADER_SOURCE_LOCATION) or C_FileSystem.ReadFile(self.WGSL_SHADER_SOURCE_LOCATION),
chain = {
sType = ffi.C.WGPUSType_ShaderModuleWGSLDescriptor,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ function WaterPlaneDrawingPipeline:Construct(wgpuDeviceHandle, textureFormatID)

return instance
end

local vfs = require("vfs")
function WaterPlaneDrawingPipeline:CreateShaderModule(wgpuDeviceHandle)
local shaderCodeDescriptor = new("WGPUShaderModuleWGSLDescriptor", {
code = C_FileSystem.ReadFile(self.WGSL_SHADER_SOURCE_LOCATION),
code = vfs.extract(self.WGSL_SHADER_SOURCE_LOCATION) or C_FileSystem.ReadFile(self.WGSL_SHADER_SOURCE_LOCATION),
chain = {
sType = ffi.C.WGPUSType_ShaderModuleWGSLDescriptor,
},
Expand Down
4 changes: 2 additions & 2 deletions Core/NativeClient/WebGPU/Pipelines/WidgetDrawingPipeline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ function WidgetDrawingPipeline:Construct(wgpuDeviceHandle, textureFormatID)

return instance
end

local vfs = require("vfs")
function WidgetDrawingPipeline:CreateShaderModule(wgpuDeviceHandle)
local shaderCodeDescriptor = new("WGPUShaderModuleWGSLDescriptor", {
code = C_FileSystem.ReadFile(self.WGSL_SHADER_SOURCE_LOCATION),
code = vfs.extract(self.WGSL_SHADER_SOURCE_LOCATION) or C_FileSystem.ReadFile(self.WGSL_SHADER_SOURCE_LOCATION),
chain = {
sType = ffi.C.WGPUSType_ShaderModuleWGSLDescriptor,
},
Expand Down
4 changes: 4 additions & 0 deletions main.lua
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
-- rm -rf luazip-build && mkdir luazip-build && cp main.lua luazip-build && cp client.lua luazip-build && cp -r Core luazip-build && cp -r DB luazip-build && cd luazip-build && evo build && mv luazip-build raglite && chmod +x raglite && cd - && cp luazip-build/raglite .. && rm -rf luazip-build


-- Placeholder: For the time being, each app has to be started separately
require("client")

0 comments on commit 9dc3683

Please sign in to comment.