Загрузка...

C++ programming: live development of vulkan engine. READ THE DESCRIPTION. Switch to HD if needed.

My code currently gives me the feeling of 3D maze with many incomplete rooms and unfinished corridors, not to mention temporary corridors and wrong rooms that shouldn't have been there. Of course, I also lost the map of this maze. Yesterday I discovered that the reason that things didn't work is due to a race condition between threads. That smelled like concurrent memory access and digging through the source code I found a particular smelling piece of rotten code. You must understand that everything that I worked on before (related to this subject that is) has a 1-on-1 mapping between GLSL declaration and identifying string in the GLSL (shader) code: vertex attributes, push constants and textures. But, the uniform buffers are different: they contain a struct with several members, each of which with their own identifying string, but only a single "declaration" for the "shader resource" that is the uniform buffer. Therefore it was not possible to link a `ShaderVariable` (identified with said string) to the `ShaderResource` directly. Instead, it points to a `ShaderResourceMember` (a member of the struct) which in turn then points to the `ShaderResource` (the uniform buffer containing the struct). What I did was store the member information of these structs in a rather 'static' place (basically the Window class) and later added a dynamic pointer to it that was updated later to point to the corresponding `ShaderResource`. Where this goes wrong is that different pipelines use different `ShaderResource` objects, because they different what descriptor set indexes and binding numbers that are used. Hence, multiple threads all try to write their own pointer to the same place... In this stream I am making a start with fixing this. Music (if any): https://tunetank.com/epic The source code of this project is Free Open Source (GPL3). The git repository can be found here: https://github.com/CarloWood/linuxviewer

Видео C++ programming: live development of vulkan engine. READ THE DESCRIPTION. Switch to HD if needed. автора Аспекты производительности на JavaScript
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки