mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-21 22:33:49 +00:00
C example update, header, and better travis tests
This commit is contained in:
parent
a7dd3c433f
commit
c013fc9498
@ -11,3 +11,9 @@ before_install:
|
||||
# Do not run bors builds against the nightly compiler.
|
||||
# We want to find out about nightly bugs, so they're done in master, but we don't block on them.
|
||||
- if [[ $TRAVIS_RUST_VERSION == "nightly" && $TRAVIS_BRANCH == "staging" ]]; then exit; fi
|
||||
|
||||
script:
|
||||
- cargo test
|
||||
- cargo build --manifest-path wgpu-native/Cargo.toml --features remote
|
||||
- cargo build
|
||||
- (cd examples && make)
|
||||
|
@ -38,5 +38,11 @@ int main()
|
||||
.code = read_file("./../data/hello_triangle.frag.spv"),
|
||||
};
|
||||
WGPUShaderModuleId _fs = wgpu_device_create_shader_module(device, fs_desc);
|
||||
|
||||
WGPUCommandBufferDescriptor cmd_buf_desc = {
|
||||
};
|
||||
WGPUCommandBufferId cmd_buf = wgpu_device_create_command_buffer(device, cmd_buf_desc);
|
||||
WGPUQueueId queue = wgpu_device_get_queue(device);
|
||||
wgpu_queue_submit(queue, &cmd_buf, 1);
|
||||
return 0;
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ typedef WGPUId WGPUCommandBufferId;
|
||||
|
||||
typedef WGPUId WGPUInstanceId;
|
||||
|
||||
typedef struct {
|
||||
|
||||
} WGPUCommandBufferDescriptor;
|
||||
|
||||
typedef WGPUId WGPUShaderModuleId;
|
||||
|
||||
typedef struct {
|
||||
@ -45,19 +49,30 @@ typedef struct {
|
||||
WGPUByteArray code;
|
||||
} WGPUShaderModuleDescriptor;
|
||||
|
||||
typedef WGPUId WGPUQueueId;
|
||||
|
||||
typedef struct {
|
||||
WGPUPowerPreference power_preference;
|
||||
} WGPUAdapterDescriptor;
|
||||
|
||||
WGPUDeviceId wgpu_adapter_create_device(WGPUAdapterId adapter_id, WGPUDeviceDescriptor desc);
|
||||
WGPUDeviceId wgpu_adapter_create_device(WGPUAdapterId adapter_id, WGPUDeviceDescriptor _desc);
|
||||
|
||||
WGPUComputePassId wgpu_command_buffer_begin_compute_pass(void);
|
||||
|
||||
WGPURenderPassId wgpu_command_buffer_begin_render_pass(WGPUCommandBufferId command_buffer);
|
||||
WGPURenderPassId wgpu_command_buffer_begin_render_pass(WGPUCommandBufferId _command_buffer);
|
||||
|
||||
WGPUInstanceId wgpu_create_instance(void);
|
||||
|
||||
WGPUCommandBufferId wgpu_device_create_command_buffer(WGPUDeviceId device_id,
|
||||
WGPUCommandBufferDescriptor desc);
|
||||
|
||||
WGPUShaderModuleId wgpu_device_create_shader_module(WGPUDeviceId device_id,
|
||||
WGPUShaderModuleDescriptor desc);
|
||||
|
||||
WGPUQueueId wgpu_device_get_queue(WGPUDeviceId device_id);
|
||||
|
||||
WGPUAdapterId wgpu_instance_get_adapter(WGPUInstanceId instance_id, WGPUAdapterDescriptor desc);
|
||||
|
||||
void wgpu_queue_submit(WGPUQueueId queue_id,
|
||||
const WGPUCommandBufferId *command_buffer_ptr,
|
||||
uintptr_t command_buffer_count);
|
||||
|
Loading…
Reference in New Issue
Block a user