mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
[vulkan] Default a view's format to that of its image
Just one less thing to duplicate.
This commit is contained in:
parent
154d1cbfcb
commit
665d88c353
1 changed files with 4 additions and 0 deletions
|
@ -289,6 +289,10 @@ create_resources (vulkan_ctx_t *ctx, objcount_t *counts)
|
|||
if (img) {
|
||||
uint32_t ind = img - job->resources->objects;
|
||||
job->image_views[i].image_view.image = ind;
|
||||
// fall back to the image's format if not overriden
|
||||
if (!job->image_views[i].image_view.format) {
|
||||
job->image_views[i].image_view.format = img->image.format;
|
||||
}
|
||||
} else {
|
||||
Sys_Printf ("%d: unknown image reference: %s\n",
|
||||
view->image.line, view->image.name);
|
||||
|
|
Loading…
Reference in a new issue