Comments (4)
Weird! I see that you are setting the copy destination flag correctly. Following the execution from .as_device_boxed_mut()
above:
Lines 260 to 302 in 9fe3db3
Any idea what the issue is?
from emu.
Update: removing the
shapes.set(vec![
Shape {
x: 0,
y: 0,
w: 100,
h: 100,
r: [2, 9]
};
1024
])?;
eliminates the error, and things always complete successfully.
Alternatively, leaving the .set
call and removing the final .get
call also prevents the panic.
Are usage flags being corrupted by .set
?
from emu.
Ok, here's the problem:
80a28e7#diff-c42b8503ace5f383ffbc7c9f91463d31dc54fc36b2d3974c49a3e2fc434024e9R331-R337
when setting, the existing staging buffer is discarded and replaced with a new staging buffer, which is created with the usage flag COPY_SRC
.
Adding to the end of the function the construction of a new staging buffer with MAP_READ | COPY_DST
(as it usually has, from the DeviceBox construction pathway) solves the issue, when it comes time to read the correct usage is there.
I would like to not do it this way, it seems quite wasteful to prepare a new allocation and immediately discard it etc. Mixing
COPY_SRC
and COPY_DST
and MAP_READ
permissions is not allowed evidently. The usage flag paradigm is the problem here, unsure how fundamentally important it really is. Perhaps two staging buffers could be lazily prepared, one for copies to/from the GPU device.
from emu.
@wbrickner Thanks for doing this investigation in this issue. I see how the staging buffer creation is problematic...
If anyone has a PR that fixes this, I can review/edit/merge.
from emu.
Related Issues (20)
- README instructions have various issues HOT 4
- Benchmarks HOT 3
- Benchmarks + against WebGPU
- Compiling error HOT 8
- Add badges to readme.md HOT 2
- Work group sizes greater than 32 don't work on Intel integrated GPU
- Important internal optimizations, potential bug
- Implementing more traits for `DeviceBox`
- Questions regarding the project HOT 1
- Logo is an ostrich not an emu HOT 1
- Unable to run on Ubuntu 20.04 due to python command HOT 1
- Rustdoc documentation search bar does not work
- Example code given in readme doesn't seem to work HOT 6
- coreaudio-sys AudioUnit compile error on Windows & Linux HOT 2
- em compilation fails, traits not implemented, and some missing imports? HOT 2
- Khronos ML summit
- `.finish()` stage of the shader compilation segfaults on NVIDIA Vulkan driver HOT 1
- How to pass a 2D array of floats? HOT 2
- Current Project Status Update? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emu.