[Mesa-dev] [PATCH 24/27] i965: Upload UBO surfaces before emitting constant state packet

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Tue Apr 28 13:08:21 PDT 2015


Now that UBOs are uploaded as push constants. We need to obtain and
append the amount of push constant entries generated by the UBO entry
fetches to the 3DSTATE_CONSTANT_* packets.

Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/mesa/drivers/dri/i965/brw_state_upload.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c
index e9f3bbd..bee6c56 100644
--- a/src/mesa/drivers/dri/i965/brw_state_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_state_upload.c
@@ -192,6 +192,10 @@ static const struct brw_tracked_state *gen7_render_atoms[] =
 
    &gen7_hw_binding_tables, /* Enable hw-generated binding tables for Haswell */
 
+   &brw_vs_ubo_surfaces,
+   &brw_gs_ubo_surfaces,
+   &brw_wm_ubo_surfaces,
+
    &gen6_vs_push_constants, /* Before vs_state */
    &gen6_gs_push_constants, /* Before gs_state */
    &gen6_wm_push_constants, /* Before wm_surfaces and constant_buffer */
@@ -200,13 +204,10 @@ static const struct brw_tracked_state *gen7_render_atoms[] =
     * table upload must be last.
     */
    &brw_vs_pull_constants,
-   &brw_vs_ubo_surfaces,
    &brw_vs_abo_surfaces,
    &brw_gs_pull_constants,
-   &brw_gs_ubo_surfaces,
    &brw_gs_abo_surfaces,
    &brw_wm_pull_constants,
-   &brw_wm_ubo_surfaces,
    &brw_wm_abo_surfaces,
    &gen6_renderbuffer_surfaces,
    &brw_texture_surfaces,
-- 
1.9.1



More information about the mesa-dev mailing list