mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +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.
|
# 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.
|
# 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
|
- 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"),
|
.code = read_file("./../data/hello_triangle.frag.spv"),
|
||||||
};
|
};
|
||||||
WGPUShaderModuleId _fs = wgpu_device_create_shader_module(device, fs_desc);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,10 @@ typedef WGPUId WGPUCommandBufferId;
|
|||||||
|
|
||||||
typedef WGPUId WGPUInstanceId;
|
typedef WGPUId WGPUInstanceId;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
|
} WGPUCommandBufferDescriptor;
|
||||||
|
|
||||||
typedef WGPUId WGPUShaderModuleId;
|
typedef WGPUId WGPUShaderModuleId;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -45,19 +49,30 @@ typedef struct {
|
|||||||
WGPUByteArray code;
|
WGPUByteArray code;
|
||||||
} WGPUShaderModuleDescriptor;
|
} WGPUShaderModuleDescriptor;
|
||||||
|
|
||||||
|
typedef WGPUId WGPUQueueId;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
WGPUPowerPreference power_preference;
|
WGPUPowerPreference power_preference;
|
||||||
} WGPUAdapterDescriptor;
|
} 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);
|
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);
|
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,
|
WGPUShaderModuleId wgpu_device_create_shader_module(WGPUDeviceId device_id,
|
||||||
WGPUShaderModuleDescriptor desc);
|
WGPUShaderModuleDescriptor desc);
|
||||||
|
|
||||||
|
WGPUQueueId wgpu_device_get_queue(WGPUDeviceId device_id);
|
||||||
|
|
||||||
WGPUAdapterId wgpu_instance_get_adapter(WGPUInstanceId instance_id, WGPUAdapterDescriptor desc);
|
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…
x
Reference in New Issue
Block a user