Comments (5)
Hi !
Yeah the correct one is the one you have now. I think the version of the validation layers I used did not pick this up since I fixed that in another project.
The error is emitted because the spec of cmd_copy_buffer says :
The size member of each element of pRegions must be less than or equal to the size of srcBuffer minus srcOffset
and
The size member of each element of pRegions must be less than or equal to the size of dstBuffer minus dstOffset
Yes, the buffer size is 60 but requires 256 bytes of allocated memory. From what I understand about it, the additional memory is related to the layout of these 60 bytes in memory.
"but it works because bytes from 60 to 255 do not matter anyway"
I think that the fact that this works is mostly due to a bit of luck given the fact that we use the api incorrectly. Maybe the driver just clamp it to 60. But most of the time not respecting the specs rules lead to unspecified behavior, so it might or might not work.
I'm not exactly an expert on Vulkan and I'm still learning about it, so I might be wrong but this is my understanding of the issue :)
from vulkan-tutorial-rs.
I fixed it on the master branch :)
from vulkan-tutorial-rs.
Cool, thanks, I'll be closing this issue then.
from vulkan-tutorial-rs.
I suppose it's not about allignment in this case: my guess is that the minimum required memory for our GPU is 256 bytes long. As for alligment changes (at least as far I understood the Vulkan docs) we should use the value that is returned in "requirements" structure (in case of ash, pass it to the helper "Align" struct). And GPU "knows" its own aligment requirements and adhers to them with respect to the format we specify for the attachement.
Does it make any sense?
from vulkan-tutorial-rs.
I suppose it's not about allignment in this case: my guess is that the minimum required memory for our GPU is 256 bytes long.
That could be just that yes. I could not find any information about the mimimum memory size for my gpu though so could not confirm.
As for alligment changes (at least as far I understood the Vulkan docs) we should use the value that is returned in "requirements" structure (in case of ash, pass it to the helper "Align" struct). And GPU "knows" its own aligment requirements and adhers to them with respect to the format we specify for the attachement.
Yes that is how I understand it too.
from vulkan-tutorial-rs.
Related Issues (4)
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 vulkan-tutorial-rs.