profile
viewpoint

KhronosGroup/MoltenVK 2448

MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on iOS and macOS.

amethyst/specs 1615

Specs - Parallel ECS

gfx-rs/wgpu 1071

Native WebGPU implementation based on gfx-hal

brendanzab/gl-rs 479

An OpenGL function pointer loader for Rust

gfx-rs/naga 127

Universal shader translation in Rust

alexcrichton/rust-compress 87

Various compression algorithms written in rust.

kvark/claymore 49

Just another tactical RPG in dark fantasy setting

jrmuizel/glsl-to-spirv 19

A glsl to spirv compiler

brendanzab/sax-rs 13

DEPRECATED - use https://github.com/netvl/rust-xml/ instead.

startedradareorg/r2ghidra-dec

started time in 4 hours

delete branch gfx-rs/wgpu-native

delete branch : kvark-ci-test

delete time in 5 hours

issue commentrust-lang/rust

ICE in _match.rs:1184:21 when building "gfx-backend-metal" on Nightly

Looks to be passing now, thank you!

kvark

comment created time in 5 hours

push eventgfx-rs/wgpu-native

Dzmitry Malyshau

commit sha 1daf497e2d50c646d6bc13c381358039364a53c7

Update lib.rs

view details

push time in 5 hours

delete branch kvark/wgpu

delete branch : buffer-size

delete time in 5 hours

issue commentgfx-rs/wgpu-rs

wgpu doesn't find Vulkan device on NixOS with nvidia drivers

Thank you for filing! Could you check ash and gfx examples as well?

Philipp-M

comment created time in 5 hours

pull request commentgfx-rs/wgpu

Move BufferSize to wgpu-types

bors r+

kvark

comment created time in 19 hours

PR opened gfx-rs/wgpu

Move BufferSize to wgpu-types

This is required to be able to update wgpu-rs, since it uses BufferSize in the internal API for its backends.

+76 -73

0 comment

6 changed files

pr created time in 19 hours

create barnchkvark/wgpu

branch : buffer-size

created branch time in 19 hours

pull request commentgfx-rs/wgpu-rs

[WIP] Update to the new BufferSize

@grovesNL how do I call set_index_buffer_with_f64_and_f64 for the unbound size?

kvark

comment created time in 19 hours

push eventkvark/wgpu-rs

Dzmitry Malyshau

commit sha edcafb93ce008c1926e3dcc5260b4c4626f5ecef

Update to the new BufferSize

view details

push time in 19 hours

pull request commentgfx-rs/wgpu-rs

[WIP] Update to the new BufferSize

@AlphaModder would you be able to cherry-pick this commit and rebase your work on top? Hope this helps.

kvark

comment created time in 19 hours

PR opened gfx-rs/wgpu-rs

[WIP] Update to the new BufferSize

Note: this switches the project to my branch. That is needed because the BufferSize changes landed in such a way that updating wgpu-rs wasn't possible (BufferSize was not in wgpu-types), and then a bunch of other stuff has landed.

+57 -63

0 comment

6 changed files

pr created time in 19 hours

create barnchkvark/wgpu-rs

branch : buffer-size

created branch time in 19 hours

create barnchkvark/wgpu

branch : intermediate

created branch time in 19 hours

delete branch kvark/gfx

delete branch : dx12-string

delete time in 20 hours

delete branch kvark/gfx

delete branch : 0.5-dx12-ub-string

delete time in 20 hours

pull request commentgfx-rs/gfx

[0.5/dx12] Backport Integrated GPU Detection

This is published in gfx-backend-dx12-0.5.4

cwfitzgerald

comment created time in a day

issue commentgpuweb/gpuweb

Should writeBuffer/writeTexture take ArrayBufferView instead of ArrayBuffer?

Yes, BufferSource makes total sense here.

kainino0x

comment created time in a day

issue commentgpuweb/gpuweb

writeBuffer error if buffer is mapped

Right, the requirement here is exactly the same as for submit: if you use a buffer in a queue, it can't be mapped at that time.

kainino0x

comment created time in a day

pull request commentgfx-rs/gfx

[0.5/dx12] fix shader stage string UB

bors r+

kvark

comment created time in a day

pull request commentgfx-rs/gfx

[dx12] fix shader stage string UB

bors r+

kvark

comment created time in a day

PR opened gfx-rs/gfx

[0.5/dx12] fix shader stage string UB

Sibling of #3262

+14 -17

0 comment

2 changed files

pr created time in a day

create barnchkvark/gfx

branch : 0.5-dx12-ub-string

created branch time in a day

PR opened gfx-rs/gfx

[dx12] fix shader stage string UB

Fixes UB in dx12's compile_shader: the formatted string was dropped before the pointer was used.

+13 -17

0 comment

1 changed file

pr created time in a day

create barnchkvark/gfx

branch : dx12-string

created branch time in a day

issue commentBVE-Reborn/bve-reborn

Freezes on Metal

I think it's saying that the shader expects a uniform struct of size 144, but your buffer binding only has space for 136. This means that accessing ._m2 fields is going outside of bounds, which is a good reason for the HW to freeze.

cwfitzgerald

comment created time in a day

issue commentron-rs/ron

Feature: Type Declaration

Thank you for filing! This requests seems a bit strange to me. You want to be able to match RON against Rust sources without actually involving the Serde-based RON deserializer (that would otherwise tell you if the types match)? Like, if you could compile Rust code and link to that crate::my_mod::MyClass module, you would just do ron::de::from_str::<MyClass>.

ac566

comment created time in a day

push eventron-rs/ron

Marli Frost

commit sha 67f6835abcdd193cecd769bc66a84a84174d9727

test: enforce newlines in array format

view details

Marli Frost

commit sha 35355ba7eb495f07282162826c29873154c2fa14

fix: expected array formatting Fixes #240

view details

push time in a day

PR merged ron-rs/ron

Fix array formatting in the new serializer

Fixes #240

+28 -13

0 comment

2 changed files

Plecra

pr closed time in a day

issue closedron-rs/ron

Pretty array formatting broken in 0.6.0

0.5.1

array: [
    (),
    (),
    (),
],

0.6.0

array: [

    (),
    (),
    (),    ],

closed time in a day

cart

issue commentgfx-rs/genmesh

Use `nalgebra` instead of `cgmath`

@VictorKoenders genmesh already exposes mint types. This discussion is about what genmesh should use internally for computations.

azriel91

comment created time in a day

issue commentkvark/copyless

More pemissive license?

I'm totally open to switch to MIT+Apache, we have that in other projects too. Let's ask the contributors for permission:

  • [x] @kvark
  • [ ] @danielhenrymantilla
  • [ ] @marcotoniut
  • [ ] @eun-ice
  • [ ] @erjanmx
  • [ ] @badboy

If we don't get an answer in a week from now, we'll consider rewriting the relevant parts.

DarkEld3r

comment created time in a day

pull request commentgfx-rs/wgpu

Make libx11 optional

bors r+

parasyte

comment created time in a day

push eventkvark/wgpu

Dzmitry Malyshau

commit sha b9c850747cd33ddcf70b359feb5370efb7217b0b

Read-only depth-stencil support

view details

push time in a day

Pull request review commentservo/servo

Implement GPURenderPipeline

 impl GPUDeviceMethods for GPUDevice {             true,         )     }++    /// https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipeline+    fn CreateRenderPipeline(+        &self,+        descriptor: &GPURenderPipelineDescriptor,+    ) -> DomRoot<GPURenderPipeline> {+        let mut valid = descriptor.parent.layout.is_valid();+        valid &= descriptor.colorStates.len() <= 4;+        if descriptor.alphaToCoverageEnabled {+            valid &= descriptor.sampleCount > 1;+        }++        let vertex_module = descriptor.vertexStage.module.id().0;+        let vertex_entry_point = descriptor.vertexStage.entryPoint.to_string();+        let (fragment_module, fragment_entry_point) = match descriptor.fragmentStage {+            Some(ref frag) => (Some(frag.module.id().0), Some(frag.entryPoint.to_string())),+            None => (None, None),+        };++        let primitive_topology = match descriptor.primitiveTopology {+            GPUPrimitiveTopology::Point_list => wgt::PrimitiveTopology::PointList,+            GPUPrimitiveTopology::Line_list => wgt::PrimitiveTopology::LineList,+            GPUPrimitiveTopology::Line_strip => wgt::PrimitiveTopology::LineStrip,+            GPUPrimitiveTopology::Triangle_list => wgt::PrimitiveTopology::TriangleList,+            GPUPrimitiveTopology::Triangle_strip => wgt::PrimitiveTopology::TriangleStrip,+        };++        let ref rs_desc = descriptor.rasterizationState;+        let rasterization_state = wgt::RasterizationStateDescriptor {+            front_face: match rs_desc.frontFace {+                GPUFrontFace::Ccw => wgt::FrontFace::Ccw,+                GPUFrontFace::Cw => wgt::FrontFace::Cw,+            },+            cull_mode: match rs_desc.cullMode {+                GPUCullMode::None => wgt::CullMode::None,+                GPUCullMode::Front => wgt::CullMode::Front,+                GPUCullMode::Back => wgt::CullMode::Back,+            },+            depth_bias: rs_desc.depthBias,+            depth_bias_slope_scale: *rs_desc.depthBiasSlopeScale,+            depth_bias_clamp: *rs_desc.depthBiasClamp,+        };++        let color_states = descriptor+            .colorStates+            .iter()+            .map(|state| wgt::ColorStateDescriptor {+                format: wgt::TextureFormat::Rgba8UnormSrgb, //TODO: Update this after implementing Texture+                alpha_blend: create_blend_descriptor(&state.alphaBlend),+                color_blend: create_blend_descriptor(&state.colorBlend),+                write_mask: wgt::ColorWrite::from_bits(state.writeMask).unwrap(),+            })+            .collect::<Vec<_>>();

It should be ArrayVec<[wgt::ColorStateDescriptor; MAX_COLOR_TARGETS]>

kunalmohan

comment created time in a day

PR opened gfx-rs/wgpu

Reviewers
Read-only depth-stencil support (RODS)

Connections Fixes #680

  • [ ] wgpu-native update
  • [ ] wgpu-rs update

Description Interestingly, this requires us to create an extra pipeline state for RODS-compatible render pipelines (one main, and one with read-only depth-stencil). This also means we are creating another compatible render pass, internally (done once).

Testing I don't know for sure that this works properly, but I'd be comfortable landing this at least if the existing functions aren't broken.

+302 -172

0 comment

8 changed files

pr created time in a day

create barnchkvark/wgpu

branch : read-only

created branch time in a day

issue openedgfx-rs/gfx

Avoid heap allocations in GraphicsPipelineDesc

It currently has a lot of Vec arguments. This should be unnecessary.

created time in a day

Pull request review commentservo/servo

Implement GPURenderPipeline

 pub enum WebGPURequest {         pipeline_layout_id: id::PipelineLayoutId,         bind_group_layouts: Vec<id::BindGroupLayoutId>,     },+    CreateRenderPipeline {

interestingly, this is the same as https://github.com/gfx-rs/wgpu/blob/4c136418ff20ed52f4c56b6af3ec419d356a9ac4/wgpu-core/src/device/trace.rs#L110 It would be good to reuse these parts. Please add a //TODO: consider https://github.com/gfx-rs/wgpu/issues/684 here

kunalmohan

comment created time in a day

Pull request review commentservo/servo

Implement GPURenderPipeline

 fn assign_filter_mode(filter_mode: GPUFilterMode) -> wgt::FilterMode {         GPUFilterMode::Linear => wgt::FilterMode::Linear,     } }++fn assign_compare_function(compare: GPUCompareFunction) -> wgt::CompareFunction {+    match compare {+        GPUCompareFunction::Never => wgt::CompareFunction::Never,+        GPUCompareFunction::Less => wgt::CompareFunction::Less,+        GPUCompareFunction::Equal => wgt::CompareFunction::Equal,+        GPUCompareFunction::Less_equal => wgt::CompareFunction::LessEqual,+        GPUCompareFunction::Greater => wgt::CompareFunction::Greater,+        GPUCompareFunction::Not_equal => wgt::CompareFunction::NotEqual,+        GPUCompareFunction::Greater_equal => wgt::CompareFunction::GreaterEqual,+        GPUCompareFunction::Always => wgt::CompareFunction::Always,+    }+}++fn create_blend_descriptor(desc: &GPUBlendDescriptor) -> wgt::BlendDescriptor {

the naming here could use some work (re: assign_ and create_). Assign implies mutation of sorts, while this is just a pure function. Creation implies some heavy lifting, while this, again, is just a pure function. Perhaps, we could prefix both with convert instead?

kunalmohan

comment created time in a day

Pull request review commentservo/servo

Implement GPURenderPipeline

 impl GPUDeviceMethods for GPUDevice {             true,         )     }++    /// https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipeline+    fn CreateRenderPipeline(+        &self,+        descriptor: &GPURenderPipelineDescriptor,+    ) -> DomRoot<GPURenderPipeline> {+        let mut valid = descriptor.parent.layout.is_valid();+        valid &= descriptor.colorStates.len() <= 4;+        if descriptor.alphaToCoverageEnabled {+            valid &= descriptor.sampleCount > 1;+        }++        let vertex_module = descriptor.vertexStage.module.id().0;+        let vertex_entry_point = descriptor.vertexStage.entryPoint.to_string();+        let (fragment_module, fragment_entry_point) = match descriptor.fragmentStage {+            Some(ref frag) => (Some(frag.module.id().0), Some(frag.entryPoint.to_string())),+            None => (None, None),+        };++        let primitive_topology = match descriptor.primitiveTopology {+            GPUPrimitiveTopology::Point_list => wgt::PrimitiveTopology::PointList,+            GPUPrimitiveTopology::Line_list => wgt::PrimitiveTopology::LineList,+            GPUPrimitiveTopology::Line_strip => wgt::PrimitiveTopology::LineStrip,+            GPUPrimitiveTopology::Triangle_list => wgt::PrimitiveTopology::TriangleList,+            GPUPrimitiveTopology::Triangle_strip => wgt::PrimitiveTopology::TriangleStrip,+        };++        let ref rs_desc = descriptor.rasterizationState;+        let rasterization_state = wgt::RasterizationStateDescriptor {+            front_face: match rs_desc.frontFace {+                GPUFrontFace::Ccw => wgt::FrontFace::Ccw,+                GPUFrontFace::Cw => wgt::FrontFace::Cw,+            },+            cull_mode: match rs_desc.cullMode {+                GPUCullMode::None => wgt::CullMode::None,+                GPUCullMode::Front => wgt::CullMode::Front,+                GPUCullMode::Back => wgt::CullMode::Back,+            },+            depth_bias: rs_desc.depthBias,+            depth_bias_slope_scale: *rs_desc.depthBiasSlopeScale,+            depth_bias_clamp: *rs_desc.depthBiasClamp,+        };++        let color_states = descriptor+            .colorStates+            .iter()+            .map(|state| wgt::ColorStateDescriptor {+                format: wgt::TextureFormat::Rgba8UnormSrgb, //TODO: Update this after implementing Texture+                alpha_blend: create_blend_descriptor(&state.alphaBlend),+                color_blend: create_blend_descriptor(&state.colorBlend),+                write_mask: wgt::ColorWrite::from_bits(state.writeMask).unwrap(),+            })+            .collect::<Vec<_>>();++        let depth_stencil_state = if let Some(ref dss_desc) = descriptor.depthStencilState {+            Some(wgt::DepthStencilStateDescriptor {+                format: wgt::TextureFormat::Rgba8UnormSrgb, //TODO: Update this

not the best format for depth-stencil :)

kunalmohan

comment created time in a day

Pull request review commentservo/servo

Implement GPURenderPipeline

 impl GPUDeviceMethods for GPUDevice {             true,         )     }++    /// https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipeline+    fn CreateRenderPipeline(+        &self,+        descriptor: &GPURenderPipelineDescriptor,+    ) -> DomRoot<GPURenderPipeline> {+        let mut valid = descriptor.parent.layout.is_valid();+        valid &= descriptor.colorStates.len() <= 4;+        if descriptor.alphaToCoverageEnabled {+            valid &= descriptor.sampleCount > 1;+        }++        let vertex_module = descriptor.vertexStage.module.id().0;+        let vertex_entry_point = descriptor.vertexStage.entryPoint.to_string();+        let (fragment_module, fragment_entry_point) = match descriptor.fragmentStage {+            Some(ref frag) => (Some(frag.module.id().0), Some(frag.entryPoint.to_string())),+            None => (None, None),+        };++        let primitive_topology = match descriptor.primitiveTopology {+            GPUPrimitiveTopology::Point_list => wgt::PrimitiveTopology::PointList,+            GPUPrimitiveTopology::Line_list => wgt::PrimitiveTopology::LineList,+            GPUPrimitiveTopology::Line_strip => wgt::PrimitiveTopology::LineStrip,+            GPUPrimitiveTopology::Triangle_list => wgt::PrimitiveTopology::TriangleList,+            GPUPrimitiveTopology::Triangle_strip => wgt::PrimitiveTopology::TriangleStrip,+        };++        let ref rs_desc = descriptor.rasterizationState;+        let rasterization_state = wgt::RasterizationStateDescriptor {+            front_face: match rs_desc.frontFace {+                GPUFrontFace::Ccw => wgt::FrontFace::Ccw,+                GPUFrontFace::Cw => wgt::FrontFace::Cw,+            },+            cull_mode: match rs_desc.cullMode {+                GPUCullMode::None => wgt::CullMode::None,+                GPUCullMode::Front => wgt::CullMode::Front,+                GPUCullMode::Back => wgt::CullMode::Back,+            },+            depth_bias: rs_desc.depthBias,+            depth_bias_slope_scale: *rs_desc.depthBiasSlopeScale,+            depth_bias_clamp: *rs_desc.depthBiasClamp,+        };++        let color_states = descriptor+            .colorStates+            .iter()+            .map(|state| wgt::ColorStateDescriptor {+                format: wgt::TextureFormat::Rgba8UnormSrgb, //TODO: Update this after implementing Texture+                alpha_blend: create_blend_descriptor(&state.alphaBlend),+                color_blend: create_blend_descriptor(&state.colorBlend),+                write_mask: wgt::ColorWrite::from_bits(state.writeMask).unwrap(),+            })+            .collect::<Vec<_>>();

nit: could use ArrayVec (to avoid heap allocation) since we know it's not more than MAX_COLOR_TARGETS elements

kunalmohan

comment created time in a day

Pull request review commentservo/servo

Implement GPURenderPipeline

 impl GPUDeviceMethods for GPUDevice {             true,         )     }++    /// https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipeline+    fn CreateRenderPipeline(+        &self,+        descriptor: &GPURenderPipelineDescriptor,+    ) -> DomRoot<GPURenderPipeline> {+        let mut valid = descriptor.parent.layout.is_valid();+        valid &= descriptor.colorStates.len() <= 4;+        if descriptor.alphaToCoverageEnabled {+            valid &= descriptor.sampleCount > 1;+        }++        let vertex_module = descriptor.vertexStage.module.id().0;+        let vertex_entry_point = descriptor.vertexStage.entryPoint.to_string();+        let (fragment_module, fragment_entry_point) = match descriptor.fragmentStage {+            Some(ref frag) => (Some(frag.module.id().0), Some(frag.entryPoint.to_string())),+            None => (None, None),+        };++        let primitive_topology = match descriptor.primitiveTopology {+            GPUPrimitiveTopology::Point_list => wgt::PrimitiveTopology::PointList,+            GPUPrimitiveTopology::Line_list => wgt::PrimitiveTopology::LineList,+            GPUPrimitiveTopology::Line_strip => wgt::PrimitiveTopology::LineStrip,+            GPUPrimitiveTopology::Triangle_list => wgt::PrimitiveTopology::TriangleList,+            GPUPrimitiveTopology::Triangle_strip => wgt::PrimitiveTopology::TriangleStrip,+        };++        let ref rs_desc = descriptor.rasterizationState;+        let rasterization_state = wgt::RasterizationStateDescriptor {+            front_face: match rs_desc.frontFace {+                GPUFrontFace::Ccw => wgt::FrontFace::Ccw,+                GPUFrontFace::Cw => wgt::FrontFace::Cw,+            },+            cull_mode: match rs_desc.cullMode {+                GPUCullMode::None => wgt::CullMode::None,+                GPUCullMode::Front => wgt::CullMode::Front,+                GPUCullMode::Back => wgt::CullMode::Back,+            },+            depth_bias: rs_desc.depthBias,+            depth_bias_slope_scale: *rs_desc.depthBiasSlopeScale,+            depth_bias_clamp: *rs_desc.depthBiasClamp,+        };++        let color_states = descriptor+            .colorStates+            .iter()+            .map(|state| wgt::ColorStateDescriptor {+                format: wgt::TextureFormat::Rgba8UnormSrgb, //TODO: Update this after implementing Texture+                alpha_blend: create_blend_descriptor(&state.alphaBlend),+                color_blend: create_blend_descriptor(&state.colorBlend),+                write_mask: wgt::ColorWrite::from_bits(state.writeMask).unwrap(),

should handle the case where this panics, ideally. I.e. do a match and in the failing arm do valid = false

kunalmohan

comment created time in a day

Pull request review commentservo/servo

Implement GPURenderPipeline

 impl GPUDeviceMethods for GPUDevice {             true,         )     }++    /// https://gpuweb.github.io/gpuweb/#dom-gpudevice-createrenderpipeline+    fn CreateRenderPipeline(+        &self,+        descriptor: &GPURenderPipelineDescriptor,+    ) -> DomRoot<GPURenderPipeline> {+        let mut valid = descriptor.parent.layout.is_valid();+        valid &= descriptor.colorStates.len() <= 4;

let's use wgc::device::MAX_COLOR_TARGETS here

kunalmohan

comment created time in a day

issue openedgfx-rs/wgpu

Expose some of the Rusty types to the outside

Is your feature request related to a problem? Please describe. The descriptors, such as RenderPipelineDescriptor contain raw pointers for the ability to be called from C API. The problem is that there are places where we need pure Rust version of these structures. One of the places is the trace module. Another place is Servo's implementation - https://github.com/servo/servo/pull/26714

Describe the solution you'd like Investigate if we can expose some of these types.

Describe alternatives you've considered Each client defines their own types.

created time in a day

issue commentgpuweb/gpuweb

Requiring integral-valued float literals to have .0 seems gratuitous

@kainino0x that would be wonderful. I just cringe a little bit at the u32 discrimination... I'd prefer to call signed integers with i suffix (e.g. 1i) for consistency.

litherum

comment created time in 2 days

Pull request review commentgfx-rs/wgpu-rs

Return errors to the user in SwapChain::get_next_texture.

 pub struct SwapChainOutput {     detail: <C as Context>::SwapChainOutputDetail, } +/// The result of a `SwapChain::get_next_texture` operation.+pub enum SwapChainResult {

get_next_frame sounds better!

AlphaModder

comment created time in 2 days

issue commentgfx-rs/wgpu

Present with damage region (VkPresentRegionKHR)

Thank you for filing! It's great to see a well made issue 👍

I think damage tracking is only feasible if you have full control over your swapchain. I.e. if you rendered to swapchain frame X before, and you render to it again, you know which parts you can rely on being preserved.

In WebGPU, every frame is a new frame. So I don't think with the current swapchain model the partial present is an option. An issue on https://github.com/webgpu-native/webgpu-headers would help to kick off the discussion. cc @Kangz

myfreeweb

comment created time in 2 days

issue commentgpuweb/gpuweb

Requiring integral-valued float literals to have .0 seems gratuitous

@kainino0x It looks like you are mixing two different things here:

  1. having number literals in general, whose type depends on the immediate context. Both 1 and 1. are number literals (integer and floating-point), they don't have exact types.
  2. having integer literals be a subset of float literals, such that one can use integers in the float context.

I expressed concerns over complicating the notion of "context", e.g for arithmetic expressions of literals (1 + 1). I don't think we need any complexity here.

litherum

comment created time in 2 days

issue commentrust-gamedev/rust-gamedev.github.io

Newsletter 10: Coordination/Tracking

grab one of the "free free" sections by leaving a comment

Where is the list of free sections?

For gfx-rs/wgpu this month I don't think we are going to share any updates. There is a lot going on in the pipeline, but no releases were made. cc @grovesNL

ozkriff

comment created time in 2 days

issue commentgpuweb/gpuweb

Development-only API features

I agree that these features are good to offer to users in some way, but not by default. They need to opt into this somehow, with a permission prompt, or by flipping a "dev mode" switch on the browser. And the rigor level of specification for these can be much lower, therefore, than for the main spec. These two aspects made me suggest to have it separately, in https://github.com/gpuweb/gpuweb/issues/794#issuecomment-635466957.

kainino0x

comment created time in 2 days

issue commentgpuweb/gpuweb

Requiring integral-valued float literals to have .0 seems gratuitous

Implicit typing is something I'd like us to steer away as much as possible. The proposed integer and float literals are useful though, for using in contexts where their expected types are well known and understood, i.e. let v: f32 = 1. I think it's good to have them, but without trying to use them in more places (which also means - simpler spec).

I don't think it's worth trying to support 1 + 1 case at all. There is no context here to infer the type for the first 1 when we are seeing it, so we should just plain error out.

litherum

comment created time in 2 days

issue commentgpuweb/gpuweb

Pipeline statistics clarifications

Here is a radical proposal: let's not have pipeline statistics in the main specification.

First, we can't specify this. We can't just say this is a bunch of numbers.

Secondly, it may expose the details of driver/HW that makes fingerprinting easier. For example, a particular driver decides to work around a hardware bug by using compute shaders for copying data between buffers and textures (internally!). This is now observable.

We already know (and I think we agree?) that this isn't useful for shipped applications. It's only useful during development, so in some sort of "dev-tools" mode of the API. So I think it's best to have a separate document for the dev-tools side of the API, explaining the synchronous error modes, additional extensions, etc.

Kangz

comment created time in 2 days

Pull request review commentgpuweb/gpuweb

GPUSamplerDescriptor and GPUSampler creation spec

 enum GPUCompareFunction { }; </script> +<dl dfn-type="enum-value" dfn-for=GPUCompareFunction>+    : <dfn>"never"</dfn>+    ::+        Comparison tests never pass.

what does it mean for the user that the comparison "passes", exactly?

JusSn

comment created time in 2 days

Pull request review commentgpuweb/gpuweb

GPUSamplerDescriptor and GPUSampler creation spec

 dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { }; </script> -### {{GPUDevice}}.<dfn method for=GPUDevice>createSampler(descriptor)</dfn> ### {#sampler-createsampler}--<div algorithm=GPUDevice.createSampler>-    **Arguments:**-        - optional {{GPUSamplerDescriptor}} |descriptor| = {}--    **Returns:** {{GPUSampler}}--    1. Let |s| be a new {{GPUSampler}} object.-    1. Set the {{GPUSampler/[[compareEnable]]}} slot of |s| to false if the {{GPUSamplerDescriptor/compare}} attribute-            of |descriptor| is null or undefined. Otherwise, set it to true.-    1. Return |s|.--    <div class=validusage dfn-for=GPUDevice.createSampler>-        <dfn abstract-op>Valid Usage</dfn>-    </div>-</div>+- {{GPUSamplerDescriptor/addressModeU}}, {{GPUSamplerDescriptor/addressModeV}}, +    and {{GPUSamplerDescriptor/addressModeW}} specify the address modes for the texture depth, width,+    and height coordinates, respectively.+- {{GPUSamplerDescriptor/magFilter}} specifies the sampling behavior for texture coordinates that do not+    correspond to at least one texel.+- {{GPUSamplerDescriptor/minFilter}} specifies the sampling behavior for texture coordinates that correspond+    to multiple texels.+- {{GPUSamplerDescriptor/mipmapFilter}} specifies behavior for sampling between two mipmap levels.+- {{GPUSamplerDescriptor/lodMinClamp}} and {{GPUSamplerDescriptor/lodMaxClamp}} specify the minimum and+    maximum levels of detail, respecitively, when sampling a texture.+- If {{GPUSamplerDescriptor/compare}} is provided, the sampler will be a comparison sampler with the specified+    {{GPUCompareFunction}}.++{{GPUAddressMode}} describes the behavior of the sampler if provided texture coordinates are beyond

This isn't true, strictly speaking. It affects the filtering on bounds as well, so the texture coordinate can be well within the texture, but the filtering footprint may not.

I think we'll need to specify what the "filtering footprint" is, to explain the filtering. It's fine to do in follow-ups, if we have an Issue here.

JusSn

comment created time in 2 days

Pull request review commentgpuweb/gpuweb

GPUSamplerDescriptor and GPUSampler creation spec

 enum GPUAddressMode { }; </script> +<dl dfn-type="enum-value" dfn-for=GPUAddressMode>+    : <dfn>"clamp-to-edge"</dfn>+    ::+        Texture coordinates are clampled between 0.0 and 1.0, inclusive.

Oh yes, this isn't exactly correct (see the comment on GPUAddressMode)

JusSn

comment created time in 2 days

Pull request review commentgpuweb/gpuweb

GPUSamplerDescriptor and GPUSampler creation spec

 dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { }; </script> -### {{GPUDevice}}.<dfn method for=GPUDevice>createSampler(descriptor)</dfn> ### {#sampler-createsampler}--<div algorithm=GPUDevice.createSampler>-    **Arguments:**-        - optional {{GPUSamplerDescriptor}} |descriptor| = {}--    **Returns:** {{GPUSampler}}--    1. Let |s| be a new {{GPUSampler}} object.-    1. Set the {{GPUSampler/[[compareEnable]]}} slot of |s| to false if the {{GPUSamplerDescriptor/compare}} attribute-            of |descriptor| is null or undefined. Otherwise, set it to true.-    1. Return |s|.--    <div class=validusage dfn-for=GPUDevice.createSampler>-        <dfn abstract-op>Valid Usage</dfn>-    </div>-</div>+- {{GPUSamplerDescriptor/addressModeU}}, {{GPUSamplerDescriptor/addressModeV}}, +    and {{GPUSamplerDescriptor/addressModeW}} specify the address modes for the texture depth, width,+    and height coordinates, respectively.+- {{GPUSamplerDescriptor/magFilter}} specifies the sampling behavior for texture coordinates that do not+    correspond to at least one texel.+- {{GPUSamplerDescriptor/minFilter}} specifies the sampling behavior for texture coordinates that correspond+    to multiple texels.+- {{GPUSamplerDescriptor/mipmapFilter}} specifies behavior for sampling between two mipmap levels.+- {{GPUSamplerDescriptor/lodMinClamp}} and {{GPUSamplerDescriptor/lodMaxClamp}} specify the minimum and+    maximum levels of detail, respecitively, when sampling a texture.

this may need to be clarified, as "maximum levels of detail used by internally when sampling a texture in the shader". The "internal" bit is important, to avoid confusion with user-provided LOD level in some of the sampling functions.

JusSn

comment created time in 2 days

Pull request review commentgpuweb/gpuweb

GPUSamplerDescriptor and GPUSampler creation spec

 dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { }; </script> -### {{GPUDevice}}.<dfn method for=GPUDevice>createSampler(descriptor)</dfn> ### {#sampler-createsampler}--<div algorithm=GPUDevice.createSampler>-    **Arguments:**-        - optional {{GPUSamplerDescriptor}} |descriptor| = {}--    **Returns:** {{GPUSampler}}--    1. Let |s| be a new {{GPUSampler}} object.-    1. Set the {{GPUSampler/[[compareEnable]]}} slot of |s| to false if the {{GPUSamplerDescriptor/compare}} attribute-            of |descriptor| is null or undefined. Otherwise, set it to true.-    1. Return |s|.--    <div class=validusage dfn-for=GPUDevice.createSampler>-        <dfn abstract-op>Valid Usage</dfn>-    </div>-</div>+- {{GPUSamplerDescriptor/addressModeU}}, {{GPUSamplerDescriptor/addressModeV}}, +    and {{GPUSamplerDescriptor/addressModeW}} specify the address modes for the texture depth, width,+    and height coordinates, respectively.+- {{GPUSamplerDescriptor/magFilter}} specifies the sampling behavior for texture coordinates that do not+    correspond to at least one texel.+- {{GPUSamplerDescriptor/minFilter}} specifies the sampling behavior for texture coordinates that correspond+    to multiple texels.

Yes. The texture coordinates alone do not correspond to one or more pixels. This is going into the whole derivatives story, so we can follow-up with clarifying this (by adding an Issue here).

JusSn

comment created time in 2 days

Pull request review commentgpuweb/gpuweb

GPUSamplerDescriptor and GPUSampler creation spec

 enum GPUAddressMode { }; </script> +<dl dfn-type="enum-value" dfn-for=GPUAddressMode>+    : <dfn>"clamp-to-edge"</dfn>+    ::+        Texture coordinates are clampled between 0.0 and 1.0, inclusive.++    : <dfn>"repeat"</dfn>+    ::+        Texture coordinates wrap to the other side of the texture.++    : <dfn>"mirror-repeat"</dfn>+    ::+        Texture coordinates between -1.0 and 1.0, inclusive, are mirrored across the axis.+        Outside -1.0 and 1.0, the texture coordinates wrap to the other side of the texture.

I don't think this is correct. What about, say, coordinate -2.5 ? We need to say something like: the texture is mirror expanded to -1.0 to 1.0 range, and that one is expanded. For example, this is how D3D12 describes it:

Flip the texture at every (u,v) integer junction. For u values between 0 and 1, for example, the texture is addressed normally; between 1 and 2, the texture is flipped (mirrored); between 2 and 3, the texture is normal again; and so on.

JusSn

comment created time in 2 days

Pull request review commentgpuweb/gpuweb

GPUSamplerDescriptor and GPUSampler creation spec

 dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { }; </script> -### {{GPUDevice}}.<dfn method for=GPUDevice>createSampler(descriptor)</dfn> ### {#sampler-createsampler}--<div algorithm=GPUDevice.createSampler>-    **Arguments:**-        - optional {{GPUSamplerDescriptor}} |descriptor| = {}--    **Returns:** {{GPUSampler}}--    1. Let |s| be a new {{GPUSampler}} object.-    1. Set the {{GPUSampler/[[compareEnable]]}} slot of |s| to false if the {{GPUSamplerDescriptor/compare}} attribute-            of |descriptor| is null or undefined. Otherwise, set it to true.-    1. Return |s|.--    <div class=validusage dfn-for=GPUDevice.createSampler>-        <dfn abstract-op>Valid Usage</dfn>-    </div>-</div>+- {{GPUSamplerDescriptor/addressModeU}}, {{GPUSamplerDescriptor/addressModeV}}, +    and {{GPUSamplerDescriptor/addressModeW}} specify the address modes for the texture depth, width,+    and height coordinates, respectively.+- {{GPUSamplerDescriptor/magFilter}} specifies the sampling behavior for texture coordinates that do not+    correspond to at least one texel.+- {{GPUSamplerDescriptor/minFilter}} specifies the sampling behavior for texture coordinates that correspond+    to multiple texels.+- {{GPUSamplerDescriptor/mipmapFilter}} specifies behavior for sampling between two mipmap levels.+- {{GPUSamplerDescriptor/lodMinClamp}} and {{GPUSamplerDescriptor/lodMaxClamp}} specify the minimum and+    maximum levels of detail, respecitively, when sampling a texture.+- If {{GPUSamplerDescriptor/compare}} is provided, the sampler will be a comparison sampler with the specified

would be good to explain in one on more sentences what "comparison sampler" actually means

JusSn

comment created time in 2 days

Pull request review commentgfx-rs/wgpu

Make libx11 optional

 default = [] trace = ["ron", "serde", "wgt/trace"] replay = ["serde", "wgt/replay"] metal-auto-capture = ["gfx-backend-metal/auto-capture"]+x11 = ["gfx-backend-vulkan/x11"]

Let's remove this, and also remove metal-auto-capture since we are at it The user can always just add a dependency on gfx-backend-vulkan directly, enabling features they need.

parasyte

comment created time in 2 days

issue commentgfx-rs/wgpu

Make libx11 optional on Vulkan

We can safely remove the dependency requirement and leave it up to the user to enable. I.e. the user may have something like this (in addition to depending on wgpu):

[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
gfx-backend-vulkan = { version = "0.5", features = ["x11"] }
parasyte

comment created time in 2 days

issue closedgfx-rs/wgpu-rs

Labels cannot be more than 63 in length

Trying to make a long label makes the rather cryptic error

thread 'main' panicked at 'index out of bounds: the len is 64 but the index is 95', C:\Users\xxxxx\.cargo\registry\src\github.com-1ecc6299db9ec823\gfx-backend-vulkan-0.5.2\src\device.rs:2284:13

which corresponds to

            // Append a null terminator to the string while avoiding allocating memory
            static mut NAME_BUF: [u8; 64] = [0u8; 64];
            std::ptr::copy_nonoverlapping(
                name.as_ptr(),
                &mut NAME_BUF[0],
                name.len().min(NAME_BUF.len()),
            );
            NAME_BUF[name.len()] = 0;

Aka making a null terminated string out of the label.

I don't know at which point in the chain wgpu-rs <-> wgpu <-> gfx-backend-vulkan to make this issue but I wish there were some checks at some point, or maybe some documentation somewhere about this. Or even just that the label was cut at 64 before sending it to wgpu.

Cleaned stacktrace:

stack backtrace:
13: gfx_backend_vulkan::Device::set_object_name
             at C:\Users\xxxxx\.cargo\registry\src\github.com-1ecc6299db9ec823\gfx-backend-vulkan-0.5.2\src\device.rs:2284
  14: gfx_backend_vulkan::device::{{impl}}::set_descriptor_set_layout_name
             at C:\Users\xxxxx\.cargo\registry\src\github.com-1ecc6299db9ec823\gfx-backend-vulkan-0.5.2\src\device.rs:2270
  15: wgpu_core::hub::Global<wgpu_core::hub::IdentityManagerFactory>::device_create_bind_group_layout<wgpu_core::hub::IdentityManagerFactory,gfx_backend_vulkan::Backend>
             at C:\Users\xxxxx\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-core-0.5.3\src\device\mod.rs:928
  16: wgpu::Device::create_bind_group_layout
             at C:\Users\xxxxx\.cargo\registry\src\github.com-1ecc6299db9ec823\wgpu-0.5.0\src\lib.rs:803

closed time in 2 days

Uriopass

issue commentgfx-rs/wgpu-rs

Labels cannot be more than 63 in length

This is fixed in the Vulkan backend. Please do cargo update -p gfx-backend-vulkan.

Uriopass

comment created time in 2 days

issue openedgfx-rs/wgpu-rs

Example for water rendering

It would be wonderful to have an example that renders water, to feature the following use cases:

  • separation of rendering into opaque and transparent passes
  • depth testing and writing
  • blending
  • read-only depth/stencil attachments - requires https://github.com/gfx-rs/wgpu/issues/680
  • procedural geometry (possibly, with dynamic updates?)
  • fancy shaders with reflection and refraction

created time in 2 days

issue openedgfx-rs/wgpu

Support read-only depth/stencil

Is your feature request related to a problem? Please describe. See https://github.com/gpuweb/gpuweb/pull/746

Describe the solution you'd like We need the extra read-only states in TextureUse, and adjust the pipeline barriers accordingly.

Additional context It would be great to have an example for showcasing this in wgpu-rs.

created time in 2 days

delete branch gpuweb/gpuweb

delete branch : kvark-mapped-args

delete time in 2 days

push eventgpuweb/gpuweb

Dzmitry Malyshau

commit sha 01b20b4ad93fabae1e8e0d7752515f69708d33e0

Fix getMappedRange arguments (#813)

view details

push time in 2 days

PR merged gpuweb/gpuweb

Fix getMappedRange arguments

<!-- This comment and the below content is programatically generated. You may add a comma-separated list of anchors you'd like a direct link to below (e.g. #idl-serializers, #idl-sequence):

Don't remove this comment or modify anything below this line.
If you don't want a preview generated for this pull request,
just replace the whole of this comment's content by "no preview"
and remove what's below.

-->


<a href="https://pr-preview.s3.amazonaws.com/gpuweb/gpuweb/pull/813.html" title="Last updated on May 27, 2020, 3:16 PM UTC (cfeda23)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/gpuweb/gpuweb/813/bbda4fd...cfeda23.html" title="Last updated on May 27, 2020, 3:16 PM UTC (cfeda23)">Diff</a>

+1 -1

0 comment

1 changed file

kvark

pr closed time in 2 days

issue commentron-rs/ron

Pretty array formatting broken in 0.6.0

Great, thank you for looking into it promptly, @Plecra! Would you be able to turn this into a PR?

cart

comment created time in 2 days

PR opened gfx-rs/wgpu

Reviewers
Enforce copy buffer-texture alignment

Connections This is a follow-up to #666

Description We are now enforcing the bytes_per_row on copy-texture copies to COPY_BYTES_PER_ROW_ALIGNMENT. We allow it being non-aligned for write_texture, which now has the code to properly align the staging space it uses, and to copy the rows one by one with proper alignment.

We are also moving BufferSize to wgpu-types, because it's required for wgpu-rs to build.

Testing Testing this needs https://github.com/gfx-rs/wgpu-rs/pull/328, which is blocked by https://github.com/gfx-rs/wgpu-rs/pull/323

+190 -119

0 comment

10 changed files

pr created time in 2 days

PR opened gfx-rs/wgpu-rs

Use the new BufferSize

Blocked by #323

+17 -25

0 comment

4 changed files

pr created time in 2 days

create barnchkvark/wgpu-rs

branch : write-texture

created branch time in 2 days

pull request commentgfx-rs/wgpu-rs

Return errors to the user in SwapChain::get_next_texture.

@AlphaModder please rebase!

AlphaModder

comment created time in 2 days

push eventkvark/wgpu

Dzmitry Malyshau

commit sha b8809b045930bfaf4dbc59175c896b4233077573

Move BufferSize to wgpu-types

view details

push time in 2 days

create barnchkvark/wgpu

branch : write-texture

created branch time in 2 days

issue commentgfx-rs/wgpu

Introspect the shader requirements for validation

@Yamakaky buffer having the right usage flags is unrelated to this issue. It's about shader requirements only.

kvark

comment created time in 3 days

create barnchgfx-rs/wgpu

branch : mozilla

created branch time in 3 days

PR opened gfx-rs/wgpu

Reviewers
New map_async logic

TODO:

  • wgpu-native PR
  • wgpu-rs PR
+222 -178

0 comment

6 changed files

pr created time in 3 days

create barnchkvark/wgpu

branch : mapping

created branch time in 3 days

issue commentamethyst/rendy

rendy-descriptor tries to create a pool of size 0

No, we changed the example to not do this any more

kvark

comment created time in 3 days

Pull request review commentgpuweb/gpuweb

Add validation for GPUDevice.createTexture()

 interface GPUTextureUsage { }; </script> +### <dfn method for=GPUDevice>createTexture(descriptor)</dfn> ### {#GPUDevice-createTexture}++<div algorithm="GPUDevice.createTexture">+  **Arguments:**+    - {{GPUTextureDescriptor}} |descriptor|++  **Returns:** {{GPUTexture}}++  1. If device is lost, or if this call doesn't follow the [$createTexture Valid Usage$], return an error texture.+  1. Let |t| be a new {{GPUTexture}} object.+  1. Set |t|.{{GPUTexture/[[textureSize]]}} to |descriptor|.{{GPUTextureDescriptor/size}}.

It would be just easier to specify if you say the descriptor is copied by value into the internal slot.

litherum

comment created time in 3 days

PR opened gpuweb/gpuweb

Reviewers
Fix getMappedRange arguments
+1 -1

0 comment

1 changed file

pr created time in 3 days

create barnchgpuweb/gpuweb

branch : kvark-mapped-args

created branch time in 3 days

GollumEvent
GollumEvent
GollumEvent
GollumEvent
GollumEvent
GollumEvent

pull request commentgfx-rs/wgpu

[0.5] Various correctness fixes

@aloucks This repository does represent the published code. Latest https://crates.io/crates/wgpu/0.5.0 was published from the corresponding v0.5 branch here, and this is where backported fixes go, like this very PR.

This has nothing to do with mozilla repositories, it's the workflow we use everywhere: gfx-rs, ron, you name it. I've yet to see an alternative that works, so I dunno what you expect.

kvark

comment created time in 3 days

issue commentron-rs/ron

Lossless primitive types

That sounds quite reasonable to me 👍 The only concern is that this is just one more step towards the format being self-describing, and we know that we aren't going to reach there. For example, you can't reconstruct an enum type efficiently just by looking at its variants.

cart

comment created time in 4 days

issue commentgpuweb/gpuweb

add depthTestEnable flag?

Not really. Disabled depth state is what you get by default if you don't initialize any members of GPUDepthStencilStateDescriptor.

yukunxie

comment created time in 4 days

issue commentgfx-rs/wgpu-rs

Validate compute bind groups against the specified layout

This is basically https://github.com/gfx-rs/wgpu/issues/552

Yamakaky

comment created time in 4 days

delete branch kvark/wgpu

delete branch : gecko-fixes

delete time in 4 days

push eventgfx-rs/wgpu-native

AlphaModder

commit sha e2be5c45768a20cfc060b8e3ee3c519b3e84d228

Update bindings for wgpu#668.

view details

push time in 4 days

PR merged gfx-rs/wgpu-native

Update bindings for wgpu#668.

Depends on gfx-rs/wgpu#668.

+13 -4

0 comment

3 changed files

AlphaModder

pr closed time in 4 days

more