bumping spirv interpreter
This commit is contained in:
@@ -23,7 +23,12 @@ It maketh use of a bespoke [SPIR-V interpreter](https://git.kbz8.me/kbz_8/SPIRV-
|
||||
|
||||
If thou art truly determined:
|
||||
```
|
||||
zig build soft
|
||||
zig build soft --release=[fast|safe|small]
|
||||
```
|
||||
|
||||
And should thou seek additional build options with:
|
||||
```
|
||||
zig build --help
|
||||
```
|
||||
|
||||
Then ensure thy Vulkan loader is pointed toward the ICD manifest.
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@
|
||||
.hash = "N-V-__8AAF9uOh0I4P_99za7N822J3JwsDaqONrFVrcEQo59",
|
||||
},
|
||||
.SPIRV_Interpreter = .{
|
||||
.url = "git+https://git.kbz8.me/kbz_8/SPIRV-Interpreter#c868a4481b6be4f7fb07c90cffcb359e4e21a7fb",
|
||||
.hash = "SPIRV_Interpreter-0.0.1-ajmpn4TyBgAgPySLGtH-ewEI0b53c3nRIjCGTugLyunr",
|
||||
.url = "git+https://git.kbz8.me/kbz_8/SPIRV-Interpreter#75099f7e1d74cd04eea3ebf93c1c3e488e3cf740",
|
||||
.hash = "SPIRV_Interpreter-0.0.1-ajmpnzLyBgBc7yh8iu2pSNAL-3B35FE8VYDA1PmklZJW",
|
||||
.lazy = true,
|
||||
},
|
||||
//.SPIRV_Interpreter = .{
|
||||
|
||||
@@ -119,6 +119,7 @@ inline fn run(data: RunData) !void {
|
||||
try barrier_rt.copySpecializationConstantsFrom(allocator, rt);
|
||||
}
|
||||
}
|
||||
|
||||
defer {
|
||||
for (barrier_runtimes) |*barrier_rt| {
|
||||
barrier_rt.deinit(allocator);
|
||||
@@ -179,9 +180,8 @@ inline fn run(data: RunData) !void {
|
||||
|
||||
rt.callEntryPoint(allocator, entry) catch |err| switch (err) {
|
||||
// Some errors can be ignored
|
||||
SpvRuntimeError.OutOfBounds,
|
||||
SpvRuntimeError.Killed,
|
||||
=> {},
|
||||
SpvRuntimeError.OutOfBounds => {},
|
||||
SpvRuntimeError.Killed => continue,
|
||||
else => return err,
|
||||
};
|
||||
|
||||
@@ -235,7 +235,7 @@ fn runBarrierWorkgroup(
|
||||
}
|
||||
}
|
||||
|
||||
inline fn dumpResultsTable(allocator: std.mem.Allocator, io: std.Io, rt: *spv.Runtime, is_early: bool) !void {
|
||||
fn dumpResultsTable(allocator: std.mem.Allocator, io: std.Io, rt: *spv.Runtime, comptime is_early: bool) !void {
|
||||
@branchHint(.cold);
|
||||
const file = try std.Io.Dir.cwd().createFile(
|
||||
io,
|
||||
|
||||
@@ -87,9 +87,13 @@ pub fn writeDescriptorSets(state: *PipelineState, rt: *spv.Runtime) !void {
|
||||
if (buffer_data.object) |buffer| {
|
||||
const binding_layout = set.?.interface.layout.bindings[binding_index];
|
||||
const dynamic_offset: vk.DeviceSize = switch (binding_layout.descriptor_type) {
|
||||
.uniform_buffer_dynamic, .storage_buffer_dynamic => state.dynamic_offsets[set_index][binding_layout.dynamic_index + descriptor_index],
|
||||
.uniform_buffer_dynamic,
|
||||
.storage_buffer_dynamic,
|
||||
=> state.dynamic_offsets[set_index][binding_layout.dynamic_index + descriptor_index],
|
||||
|
||||
else => 0,
|
||||
};
|
||||
|
||||
const map = buffer.mapAsSliceWithAddedOffset(u8, buffer_data.offset + dynamic_offset, buffer_data.size) catch continue :bindings;
|
||||
rt.writeDescriptorSet(
|
||||
map,
|
||||
@@ -163,6 +167,7 @@ pub fn writeDescriptorSets(state: *PipelineState, rt: *spv.Runtime) !void {
|
||||
const addr: usize = @intFromPtr(image_view);
|
||||
data.image = addr;
|
||||
}
|
||||
|
||||
if (texture_data.sampler) |sampler| {
|
||||
const addr: usize = @intFromPtr(sampler);
|
||||
data.sampler = addr;
|
||||
|
||||
@@ -29,6 +29,7 @@ pub fn shaderInvocation(
|
||||
) SpvRuntimeError![spv.SPIRV_MAX_OUTPUT_LOCATIONS][@sizeOf(zm.F32x4)]u8 {
|
||||
var fragment_inputs = inputs;
|
||||
errdefer freeOwnedInputs(allocator, fragment_inputs);
|
||||
|
||||
const derivatives = derivative_inputs;
|
||||
errdefer if (derivatives) |owned_derivatives| {
|
||||
freeOwnedInputs(allocator, owned_derivatives.dx);
|
||||
|
||||
Reference in New Issue
Block a user