Rust-GPU / Rust-GPU/rust-gpu

[Migrated] Emulate Image/Sampler API operations on non-SPIRV platforms

Abierto
#84 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Rust
Estrellas
3.4k
Forks
126
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1065
Old labels: t: enhancement
Originally creatd by Keavon on 2023-05-26T16:12:52Z 👍: 4 ❤️: 2


While the GPU provides hardware for texture sampling and interpolation, on other targets (i.e. CPU in general) it's necessary to emulate that. Currently, the Image and Sampler APIs don't provide texture sampling operations when compiling to non-SPIRV targets.

We need this for an issue on Graphite to support image transformation with graceful CPU fallback (even if the performance would be not ideal), since WebGPU is only available on Chromium browsers for now and thus CPU is still an important target. Having this feature be as performant as possible would be eventually nice, but a slower solution would be a reasonable starting point of greater priority to our use case (something is better than nothing, existing is better than fast).

This issue was discussed in the Embark Discord.

Also on Discord before filing this issue, @eddyb summarized some recollection of the potential main three main concerns involved:

how to feed data into the API, how the API stores the data internally, and how the sampling is implemented - with the middle one, with its potential need to add lifetimes, and/or remove Copy & use Arc, being the worst part, since at least unoptimized sampling is mostly "just" looking up 4 texels and interpolating them

Guía de contribución

Abrir la guía de contribución

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.

Línea de trabajo

Comienza localizando las API de Image y Sampler y sus rutas de compilación que no son SPIR-V. Sigue cómo se proporcionan y almacenan los datos de textura y, a continuación, determina el comportamiento de muestreo necesario para CPU y otros destinos que no sean SPIR-V; se considera terminado cuando estas API proporcionen muestreo e interpolación de texturas fuera de SPIR-V, preservando al mismo tiempo el comportamiento existente de la GPU.

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

Evaluación

Stack tecnológico
rust
Área
computer-graphics
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.