mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 15:10:21 +01:00
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 <brian.paul@broadcom.com> Reviewed-by: Neha Bhende <neha.bhende@broadcom.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35238>
This commit is contained in:
parent
dac04694b2
commit
64da531799
1 changed files with 1 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue