mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +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) {
|
if (img) {
|
||||||
uint32_t ind = img - job->resources->objects;
|
uint32_t ind = img - job->resources->objects;
|
||||||
job->image_views[i].image_view.image = ind;
|
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 {
|
} else {
|
||||||
Sys_Printf ("%d: unknown image reference: %s\n",
|
Sys_Printf ("%d: unknown image reference: %s\n",
|
||||||
view->image.line, view->image.name);
|
view->image.line, view->image.name);
|
||||||
|
|
Loading…
Reference in a new issue