gpu: use PowerPreference
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
9c2fc82fa3
commit
40f92dd9d9
4 changed files with 6 additions and 7 deletions
|
|
@ -74,7 +74,9 @@ pub fn setup(allocator: std.mem.Allocator) !Setup {
|
|||
try discoverAdapters(instance, window, backend_type);
|
||||
|
||||
// Request an adapter.
|
||||
const backend_adapter = switch (nosuspend gpu_interface.requestAdapter(&.{})) {
|
||||
const backend_adapter = switch (nosuspend gpu_interface.requestAdapter(&.{
|
||||
.power_preference = .high_performance,
|
||||
})) {
|
||||
.adapter => |v| v,
|
||||
.err => |err| {
|
||||
std.debug.print("failed to get adapter: error={} {s}\n", .{ err.code, err.message });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue