!fjjkgHFcwtkREywzfk:matrix.org

Naga Shader Translator

250 Members
v0.20.0!11 Servers

Load older messages


SenderMessageTime
5 Jul 2024
@erichdongubler-mozilla:mozilla.orgErichDonGubler
cargo clippy --workspace --all-features
warning: field `overrides` is never read
 --> naga/src/compact/expressions.rs:6:9
  |
4 | pub struct ExpressionTracer<'tracer> {
  |            ---------------- field in this struct
5 |     pub constants: &'tracer Arena<crate::Constant>,
6 |     pub overrides: &'tracer Arena<crate::Override>,
  |         ^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: field `locals` is never read
   --> naga/src/front/wgsl/parse/ast.rs:145:9
    |
115 | pub struct Function<'a> {
    |            -------- field in this struct
...
145 |     pub locals: Arena<Local>,
    |         ^^^^^^
    |
    = note: `Function` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

warning: `naga` (lib) generated 2 warnings
01:51:11
@erichdongubler-mozilla:mozilla.orgErichDonGubler *
$ cargo clippy --workspace --all-features
warning: field `overrides` is never read
 --> naga/src/compact/expressions.rs:6:9
  |
4 | pub struct ExpressionTracer<'tracer> {
  |            ---------------- field in this struct
5 |     pub constants: &'tracer Arena<crate::Constant>,
6 |     pub overrides: &'tracer Arena<crate::Override>,
  |         ^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: field `locals` is never read
   --> naga/src/front/wgsl/parse/ast.rs:145:9
    |
115 | pub struct Function<'a> {
    |            -------- field in this struct
...
145 |     pub locals: Arena<Local>,
    |         ^^^^^^
    |
    = note: `Function` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

warning: `naga` (lib) generated 2 warnings
01:51:16
@erichdongubler-mozilla:mozilla.orgErichDonGublerIs there any reason we shouldn't just delete these fields? I don't think they're holding anything alive, but I feel like I might be missing something important.01:52:42
@erichdongubler-mozilla:mozilla.orgErichDonGubler I hesitate in the case of Function::locals especially because it has quite a bit of documentation, and I'm not sure where it would migrate to. 01:53:16
@erichdongubler-mozilla:mozilla.orgErichDonGubler I see they're marked as pub, but they aren't actually exposed outside the crate. Are they supposed to be exposed to external users via Debug? 01:57:16
@jimb:mozilla.orgjimb Almost nothing in compact should be public, outside the compact function itself. 02:53:18
@jimb:mozilla.orgjimb It's supposed to be a self-contained thing. Everything should be at most pub(super) 02:53:39
@erichdongubler-mozilla:mozilla.orgErichDonGublerYeah, I didn't think so. Sooo…this means we can delete unused stuff with prejudice, right? 😀04:48:40
6 Jul 2024
@thequstiner:4d2.orgthequstiner joined the room.05:32:09
@thequstiner:4d2.orgthequstinerHello are there any goo dexamples on how to covert a spv shader to glsl vertex/fragment shaders programmically?05:34:05
@wumpf:matrix.orgwumpf
In reply to @thequstiner:4d2.org
Hello are there any goo dexamples on how to covert a spv shader to glsl vertex/fragment shaders programmically?
check the naga-cli tool https://github.com/gfx-rs/wgpu/blob/25bc704e3515fdfd191bd414b6fa35e28f58d366/naga/README.md#conversion-tool
08:16:22
@wumpf:matrix.orgwumpfhad an idea how to avoid building msl-out on Windows / hlsl-out on Linux/Mac when a user is only after building wgpu-hal while not affecting the usecase of explicitely wanting to emit msl/hlsl on any platform https://github.com/gfx-rs/wgpu/pull/5919 Was quite surprised this saved of 1.4s of the overall wgpu build times on my Windows machine! The solution is a lil bit clunky tho, curious to hear what Naga folks thing :) 10:14:20
@wumpf:matrix.orgwumpf * had an idea how to avoid building msl-out on Windows / hlsl-out on Linux/Mac when a user is only after building wgpu-hal while not affecting the usecase of explicitely wanting to emit msl/hlsl on any platform https://github.com/gfx-rs/wgpu/pull/5919 Was quite surprised this saved of 1.4s of the overall wgpu build times on my Windows machine! The solution is a lil bit clunky tho, curious to hear what Naga folks think :) 10:14:29
7 Jul 2024
@ashley_:matrix.org@ashley_:matrix.org changed their profile picture.11:22:52
@ashley_:matrix.org@ashley_:matrix.org left the room.11:24:31
9 Jul 2024
@wusyong:matrix.orgYu-Wei Wu joined the room.09:32:44
10 Jul 2024
@ivoleitao:matrix.orgIvo Leitão joined the room.22:15:50
14 Jul 2024
@joshprk:matrix.orgjoshprk joined the room.07:58:53
@ncthbrt:matrix.orgNatalie CuthbertDoes naga build for wasm32-wasi?12:23:12
@cwfitzgerald:matrix.orgcwfitzgerald
In reply to @ncthbrt:matrix.org
Does naga build for wasm32-wasi?
It's io-less rust, so likely
20:43:37
16 Jul 2024
@unarelith:matrix.orgunarelith joined the room.10:18:47
18 Jul 2024
@unarelith:matrix.orgunarelith

Hello, I've been trying to use Naga but it fails on most compute shaders
Here is the error:

Function [1] 'main' is invalid:
        The value [209] can not be stored
12:44:57
@unarelith:matrix.orgunarelithDownload tmp.spvasm12:45:03
@unarelith:matrix.orgunarelithDo anyone understand this error?12:45:51
@unarelith:matrix.orgunarelith * Does anyone understand this error?12:46:05
@unarelith:matrix.orgunarelith *

Hello, I've been trying to use Naga but it fails on most compute shaders
Here is the error:

Function [1] 'main' is invalid:
        The value [209] can not be stored
Generating wgsl output requires validation to succeed, and it failed in a previous step
12:47:46
19 Jul 2024
@jasmine1717:matrix.orgjasmine1717PartialEq is no longer implemented for naga types, which breaks naga_oil :/. Not sure how to work around this, it was used for fetch_if_or_append and fetch_or_append a lot.05:46:03
@teoxoy:matrix.orgteoxoyWould using `.append()` instead cause issues? I think it makes sense that the types that don't go in the `UniqueArena` don't implement `PartialEq`.08:21:01
@teoxoy:matrix.orgteoxoyPlease open an issue though, it's hard to keep track of issues in multiple places.08:22:19
22 Jul 2024
@gschian0:matrix.org@gschian0:matrix.org left the room.14:23:04

There are no newer messages yet.


Back to Room ListRoom Version: 5