Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zgpu] Build Dawn from sources #463

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fn samples(b: *std.Build, options: Options) void {
install(b, minimal_sdl_gl.build(b, options), "minimal_sdl_gl");
install(b, minimal_zgui_glfw_gl.build(b, options), "minimal_zgui_glfw_gl");

if (zgpu.checkTargetSupported(options.target)) {
{ // samples using zgpu
const triangle_wgpu = @import("samples/triangle_wgpu/build.zig");
const procedural_mesh_wgpu = @import("samples/procedural_mesh_wgpu/build.zig");
const textured_quad_wgpu = @import("samples/textured_quad_wgpu/build.zig");
Expand Down
20 changes: 0 additions & 20 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,5 @@
.zaudio = .{ .path = "libs/zaudio" },
.zflecs = .{ .path = "libs/zflecs" },
.system_sdk = .{ .path = "libs/system-sdk" },
.dawn_x86_64_windows_gnu = .{
.url = "https://github.com/michal-z/webgpu_dawn-x86_64-windows-gnu/archive/d3a68014e6b6b53fd330a0ccba99e4dcfffddae5.tar.gz",
.hash = "1220f9448cde02ef3cd51bde2e0850d4489daa0541571d748154e89c6eb46c76a267",
},
.dawn_x86_64_linux_gnu = .{
.url = "https://github.com/michal-z/webgpu_dawn-x86_64-linux-gnu/archive/7d70db023bf254546024629cbec5ee6113e12a42.tar.gz",
.hash = "12204a3519efd49ea2d7cf63b544492a3a771d37eda320f86380813376801e4cfa73",
},
.dawn_aarch64_linux_gnu = .{
.url = "https://github.com/michal-z/webgpu_dawn-aarch64-linux-gnu/archive/c1f55e740a62f6942ff046e709ecd509a005dbeb.tar.gz",
.hash = "12205cd13f6849f94ef7688ee88c6b74c7918a5dfb514f8a403fcc2929a0aa342627",
},
.dawn_aarch64_macos = .{
.url = "https://github.com/michal-z/webgpu_dawn-aarch64-macos/archive/d2360cdfff0cf4a780cb77aa47c57aca03cc6dfe.tar.gz",
.hash = "12201fe677e9c7cfb8984a36446b329d5af23d03dc1e4f79a853399529e523a007fa",
},
.dawn_x86_64_macos = .{
.url = "https://github.com/michal-z/webgpu_dawn-x86_64-macos/archive/901716b10b31ce3e0d3fe479326b41e91d59c661.tar.gz",
.hash = "1220b1f02f2f7edd98a078c64e3100907d90311d94880a3cc5927e1ac009d002667a",
},
},
}
117 changes: 117 additions & 0 deletions libs/system-sdk/linux/include/xcb/bigreq.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/*
* This file generated automatically from bigreq.xml by c_client.py.
* Edit at your peril.
*/

/**
* @defgroup XCB_BigRequests_API XCB BigRequests API
* @brief BigRequests XCB Protocol Implementation.
* @{
**/

#ifndef __BIGREQ_H
#define __BIGREQ_H

#include "xcb.h"

#ifdef __cplusplus
extern "C" {
#endif

#define XCB_BIGREQUESTS_MAJOR_VERSION 0
#define XCB_BIGREQUESTS_MINOR_VERSION 0

extern xcb_extension_t xcb_big_requests_id;

/**
* @brief xcb_big_requests_enable_cookie_t
**/
typedef struct xcb_big_requests_enable_cookie_t {
unsigned int sequence;
} xcb_big_requests_enable_cookie_t;

/** Opcode for xcb_big_requests_enable. */
#define XCB_BIG_REQUESTS_ENABLE 0

/**
* @brief xcb_big_requests_enable_request_t
**/
typedef struct xcb_big_requests_enable_request_t {
uint8_t major_opcode;
uint8_t minor_opcode;
uint16_t length;
} xcb_big_requests_enable_request_t;

/**
* @brief xcb_big_requests_enable_reply_t
**/
typedef struct xcb_big_requests_enable_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
uint32_t maximum_request_length;
} xcb_big_requests_enable_reply_t;

/**
* @brief Enable the BIG-REQUESTS extension
*
* @param c The connection
* @return A cookie
*
* This enables the BIG-REQUESTS extension, which allows for requests larger than
* 262140 bytes in length. When enabled, if the 16-bit length field is zero, it
* is immediately followed by a 32-bit length field specifying the length of the
* request in 4-byte units.
*
*/
xcb_big_requests_enable_cookie_t
xcb_big_requests_enable (xcb_connection_t *c);

/**
* @brief Enable the BIG-REQUESTS extension
*
* @param c The connection
* @return A cookie
*
* This enables the BIG-REQUESTS extension, which allows for requests larger than
* 262140 bytes in length. When enabled, if the 16-bit length field is zero, it
* is immediately followed by a 32-bit length field specifying the length of the
* request in 4-byte units.
*
* This form can be used only if the request will cause
* a reply to be generated. Any returned error will be
* placed in the event queue.
*/
xcb_big_requests_enable_cookie_t
xcb_big_requests_enable_unchecked (xcb_connection_t *c);

/**
* Return the reply
* @param c The connection
* @param cookie The cookie
* @param e The xcb_generic_error_t supplied
*
* Returns the reply of the request asked by
*
* The parameter @p e supplied to this function must be NULL if
* xcb_big_requests_enable_unchecked(). is used.
* Otherwise, it stores the error if any.
*
* The returned value must be freed by the caller using free().
*/
xcb_big_requests_enable_reply_t *
xcb_big_requests_enable_reply (xcb_connection_t *c,
xcb_big_requests_enable_cookie_t cookie /**< */,
xcb_generic_error_t **e);


#ifdef __cplusplus
}
#endif

#endif

/**
* @}
*/