vk: add a note about future plans (E386)

This commit is contained in:
Ivan Avdeev 2024-12-19 13:08:46 -05:00
parent c31482c3f7
commit 92200e9cdc
2 changed files with 18 additions and 5 deletions

View File

@ -1200,3 +1200,21 @@ Solution: make build dir literally just `./build`.
### vk_brush.c / collect emissive surfaces
- (I) try to merge emissive collection with surface loading
- (II) convert from pushing material data to pulling. Not really clear how to do easily.
# 2024-12-19 E386 resources / pre render graph
What do we want? Resources and producers! When do we want it? Maybe next stream.
- Resource itself: `r_vk_resource_i` -- interface
- name
- type
- producer
- (opaque impl: e.g. in the same alloc, right after this header struct)
- Resource manager:
- `r_vk_resource_i* resources[]` -- collection of pointers to resources
- dynamic array, hash table, etc..
- `findResourceByName(const char *)`
- also by type? not sure. Requester can check for the expected type too.
- `registerResource(r_vk_resource_i *res)`
- `deregisterResource(..)`
- Resource producer
- When resource is used, the user should call `resource->produce()` or something like that.
- ????? It's not really clear how to do this properly. E.g. how to invoke producing only once per frame?

View File

@ -404,11 +404,6 @@ static void reloadMainpipe(void) {
destroyMainpipe();
// TODO currently changing texture format is not handled. It will try to reuse existing image with the old format
// which will probably fail. To handle it we'd need to refactor this:
// 1. r_vk_image_t should have a field with its current format? (or we'd also store if with the resource here)
// 2. do another loop here to detect format mismatch and recreate.
g_rtx.mainpipe = newpipe;
g_rtx.mainpipe_resources = newpipe_resources;
g_rtx.mainpipe_out = newpipe_out;