From 64da531799ae11aaa8de22a4ea7b62b74ecf2937 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 25 Mar 2025 15:43:47 -0600 Subject: [PATCH] svga: remove unneeded assignments in svga_set_framebuffer_state() The util_copy_framebuffer_state() function copies the width, height, nr_cbufs fields. Also move a loop variable. Signed-off-by: Brian Paul Reviewed-by: Neha Bhende Part-of: --- src/gallium/drivers/svga/svga_pipe_misc.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c index dcd31ca6d32..8239949ce2a 100644 --- a/src/gallium/drivers/svga/svga_pipe_misc.c +++ b/src/gallium/drivers/svga/svga_pipe_misc.c @@ -93,17 +93,12 @@ svga_set_framebuffer_state(struct pipe_context *pipe, { struct svga_context *svga = svga_context(pipe); struct pipe_framebuffer_state *dst = &svga->curr.framebuffer; - unsigned i; /* make sure any pending drawing calls are flushed before changing * the framebuffer state */ svga_hwtnl_flush_retry(svga); - dst->width = fb->width; - dst->height = fb->height; - dst->nr_cbufs = fb->nr_cbufs; - /* Check that all surfaces are the same size. * Actually, the virtual hardware may support rendertargets with * different size, depending on the host API and driver, @@ -113,7 +108,7 @@ svga_set_framebuffer_state(struct pipe_context *pipe, if (fb->zsbuf.texture) { pipe_surface_size(&fb->zsbuf, &width, &height); } - for (i = 0; i < fb->nr_cbufs; ++i) { + for (unsigned i = 0; i < fb->nr_cbufs; ++i) { if (fb->cbufs[i].texture) { if (width && height) { uint16_t cwidth, cheight;