test
This commit is contained in:
@@ -58,7 +58,7 @@ jobs:
|
||||
which deqp-runner && deqp-runner --version || echo "deqp-runner not found"
|
||||
|
||||
- name: Run Vulkan CTS
|
||||
run: zig build cts-soft --release=fast -- -j4
|
||||
run: zig build cts-soft --release=fast -Dlog="standard" -- -j4
|
||||
continue-on-error: true
|
||||
|
||||
- name: Verify tests
|
||||
|
||||
@@ -110,7 +110,12 @@ pub fn draw(self: *Self, vertex_count: usize, instance_count: usize, first_verte
|
||||
defer if (comptime base.config.logs != .none) {
|
||||
const duration = timer.untilNow(io, .real);
|
||||
const ms = duration.toMicroseconds();
|
||||
std.log.scoped(.SoftwareRenderer).warn("Drawcall stats:\n> Took {d}us\n> Allocated {d} KB", .{ ms, @divTrunc(arena.queryCapacity(), 1000) });
|
||||
const memory_footprint = @divTrunc(arena.queryCapacity(), 1000);
|
||||
const logger = std.log.scoped(.SoftwareRenderer);
|
||||
if (memory_footprint > 256_000)
|
||||
logger.warn("Drawcall stats:\n> Took {d}us\n> Allocated {d} KB", .{ ms, memory_footprint })
|
||||
else
|
||||
logger.debug("Drawcall stats:\n> Took {d}us\n> Allocated {d} KB", .{ ms, memory_footprint });
|
||||
};
|
||||
|
||||
self.vertexShaderStage(allocator, &draw_call, vertex_count, instance_count, first_vertex, first_instance, null) catch |err| {
|
||||
@@ -137,7 +142,12 @@ pub fn drawIndexed(self: *Self, index_count: usize, instance_count: usize, first
|
||||
defer if (comptime base.config.logs != .none) {
|
||||
const duration = timer.untilNow(io, .real);
|
||||
const ms = duration.toMicroseconds();
|
||||
std.log.scoped(.SoftwareRenderer).warn("Drawcall indexed stats:\n> Took {d}us\n> Allocated {d} KB", .{ ms, @divTrunc(arena.queryCapacity(), 1000) });
|
||||
const memory_footprint = @divTrunc(arena.queryCapacity(), 1000);
|
||||
const logger = std.log.scoped(.SoftwareRenderer);
|
||||
if (memory_footprint > 256_000)
|
||||
logger.warn("Drawcall indexed stats:\n> Took {d}us\n> Allocated {d} KB", .{ ms, memory_footprint })
|
||||
else
|
||||
logger.debug("Drawcall indexed stats:\n> Took {d}us\n> Allocated {d} KB", .{ ms, memory_footprint });
|
||||
};
|
||||
|
||||
self.vertexShaderStage(allocator, &draw_call, index_count, instance_count, 0, first_instance, indices) catch |err| {
|
||||
|
||||
@@ -167,6 +167,8 @@ pub fn drawTriangleFilled(allocator: std.mem.Allocator, fragments: *std.ArrayLis
|
||||
.color = zm.f32x4(1.0, 1.0, 1.0, 1.0),
|
||||
.inputs = try interpolateVertexOutputs(allocator, v0, v1, v2, b0, b1, b2),
|
||||
}) catch return VkError.OutOfDeviceMemory;
|
||||
if (fragments.len > 64_000)
|
||||
return VkError.MemoryFootprintTooBigDrv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ pub const VkError = error{
|
||||
InvalidHandleDrv,
|
||||
InvalidPipelineDrv,
|
||||
InvalidDeviceMemoryDrv,
|
||||
MemoryFootprintTooBigDrv,
|
||||
};
|
||||
|
||||
pub inline fn errorLogger(err: VkError) void {
|
||||
|
||||
Reference in New Issue
Block a user