From 387a414f2cb2673e9adbe2f84a4a54d5f2a5334c Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 30 Jul 2018 22:59:52 -0700 Subject: [PATCH] iris: add minor comments --- src/gallium/drivers/iris/iris_context.h | 2 ++ src/gallium/drivers/iris/iris_state.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 7db903acbc3..0708410a7fb 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -314,8 +314,10 @@ struct iris_context { /** 3DSTATE_STREAMOUT and 3DSTATE_SO_DECL_LIST packets */ uint32_t *streamout; + /** The SURFACE_STATE for a 1x1x1 null surface. */ struct iris_state_ref unbound_tex; + /** The SURFACE_STATE for a framebuffer-sized null surface. */ struct iris_state_ref null_fb; struct u_upload_mgr *surface_uploader; diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index abbdcda97ca..76972307ea9 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2686,6 +2686,7 @@ iris_populate_binding_table(struct iris_context *ice, if (stage == MESA_SHADER_FRAGMENT) { struct pipe_framebuffer_state *cso_fb = &ice->state.framebuffer; + /* Note that cso_fb->nr_cbufs == fs_key->nr_color_regions. */ if (cso_fb->nr_cbufs) { for (unsigned i = 0; i < cso_fb->nr_cbufs; i++) { if (cso_fb->cbufs[i]) @@ -2693,8 +2694,9 @@ iris_populate_binding_table(struct iris_context *ice, else bt_map[s++] = use_null_fb_surface(batch, ice); } - } else + } else { bt_map[s++] = use_null_fb_surface(batch, ice); + } } //assert(prog_data->binding_table.texture_start == -- 2.30.2