feat: Support `.with(override, value)` on guarded compute pipelines

Abierto
#3,134 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start at TgpuGuardedComputePipeline and root.createGuardedComputePipeline, then compare the existing pipeline.with() handling for override values and bind groups. Add the guarded overload and verify that pipeline.with(scale, 2).dispatchThreads(128) works, including the corresponding immediate-variable behavior if it is covered alongside overrides.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Follow-up to #3131.

Problem

Compute and render pipelines accept override values with pipeline.with(override, value). Guarded compute pipelines, created with root.createGuardedComputePipeline(), don't. Their .with() only accepts a bind group.

The current workaround is to go through the underlying pipeline:

guarded.pipeline.with(scale, 2);

But then dispatchThreads() can't be used, since that's only on the guarded pipeline.

Proposal

Add a .with(override, value) overload to TgpuGuardedComputePipeline that passes the value to the underlying pipeline:

const scale = tgpu['~unstable'].override(d.f32, 1);

const pipeline = root.createGuardedComputePipeline((x) => {
  'use gpu';
  // ... uses scale.$
});

pipeline.with(scale, 2).dispatchThreads(128);

The same could be done for immediate variables, which are also missing there.

Lenguaje dominante
TypeScript
Estrellas
3.3k
Forks
141
Merge medio
3 d 7 h
PR fusionados (30 d)
66

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de software-mansion/TypeGPU

Todos los issues de software-mansion/TypeGPU

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.