Mesa (master): zink: use 'fb' variable name for zink_framebuffer objects in zink_framebuffer.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jan 14 22:18:16 UTC 2021
Module: Mesa
Branch: master
Commit: 49bb7919916ec4da424518a358f1e1e87ea9a4d7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49bb7919916ec4da424518a358f1e1e87ea9a4d7
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu Dec 24 09:22:25 2020 -0500
zink: use 'fb' variable name for zink_framebuffer objects in zink_framebuffer.c
let's be a bit consistent and intuitive
Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8227>
---
src/gallium/drivers/zink/zink_framebuffer.c | 34 ++++++++++++++---------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_framebuffer.c b/src/gallium/drivers/zink/zink_framebuffer.c
index bd1ba41c7d1..3baf8aca4e2 100644
--- a/src/gallium/drivers/zink/zink_framebuffer.c
+++ b/src/gallium/drivers/zink/zink_framebuffer.c
@@ -61,15 +61,15 @@ framebuffer_null_surface_init(struct zink_context *ctx, struct zink_framebuffer_
void
zink_destroy_framebuffer(struct zink_screen *screen,
- struct zink_framebuffer *fbuf)
+ struct zink_framebuffer *fb)
{
- vkDestroyFramebuffer(screen->dev, fbuf->fb, NULL);
- for (int i = 0; i < ARRAY_SIZE(fbuf->surfaces); ++i)
- pipe_surface_reference(fbuf->surfaces + i, NULL);
+ vkDestroyFramebuffer(screen->dev, fb->fb, NULL);
+ for (int i = 0; i < ARRAY_SIZE(fb->surfaces); ++i)
+ pipe_surface_reference(fb->surfaces + i, NULL);
- pipe_surface_reference(&fbuf->null_surface, NULL);
+ pipe_surface_reference(&fb->null_surface, NULL);
- ralloc_free(fbuf);
+ ralloc_free(fb);
}
struct zink_framebuffer *
@@ -77,19 +77,19 @@ zink_create_framebuffer(struct zink_context *ctx, struct zink_screen *screen,
struct zink_framebuffer_state *state,
struct pipe_surface **attachments)
{
- struct zink_framebuffer *fbuf = rzalloc(NULL, struct zink_framebuffer);
- if (!fbuf)
+ struct zink_framebuffer *fb = rzalloc(NULL, struct zink_framebuffer);
+ if (!fb)
return NULL;
- pipe_reference_init(&fbuf->reference, 1);
+ pipe_reference_init(&fb->reference, 1);
for (int i = 0; i < state->num_attachments; i++) {
if (state->attachments[i])
- pipe_surface_reference(&fbuf->surfaces[i], attachments[i]);
+ pipe_surface_reference(&fb->surfaces[i], attachments[i]);
else {
- if (!fbuf->null_surface)
- fbuf->null_surface = framebuffer_null_surface_init(ctx, state);
- state->attachments[i] = zink_surface(fbuf->null_surface)->image_view;
+ if (!fb->null_surface)
+ fb->null_surface = framebuffer_null_surface_init(ctx, state);
+ state->attachments[i] = zink_surface(fb->null_surface)->image_view;
}
}
@@ -102,13 +102,13 @@ zink_create_framebuffer(struct zink_context *ctx, struct zink_screen *screen,
fci.height = state->height;
fci.layers = state->layers;
- if (vkCreateFramebuffer(screen->dev, &fci, NULL, &fbuf->fb) != VK_SUCCESS) {
- zink_destroy_framebuffer(screen, fbuf);
+ if (vkCreateFramebuffer(screen->dev, &fci, NULL, &fb->fb) != VK_SUCCESS) {
+ zink_destroy_framebuffer(screen, fb);
return NULL;
}
- memcpy(&fbuf->state, state, sizeof(struct zink_framebuffer_state));
+ memcpy(&fb->state, state, sizeof(struct zink_framebuffer_state));
- return fbuf;
+ return fb;
}
void
More information about the mesa-commit
mailing list