radeonsi: pack si_buffer_resources better
authorMarek Olšák <marek.olsak@amd.com>
Fri, 9 Jun 2017 17:40:44 +0000 (19:40 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 12 Jun 2017 16:24:37 +0000 (18:24 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state.h

index b616757c0affaaf0c07403f2ed80d79c6b9bbfe7..d8bf13e794ad8364e4fe6c733bb7c50582e3df60 100644 (file)
@@ -267,12 +267,13 @@ struct si_sampler_views {
 };
 
 struct si_buffer_resources {
-       enum radeon_bo_usage            shader_usage; /* READ, WRITE, or READWRITE */
-       enum radeon_bo_usage            shader_usage_constbuf;
-       enum radeon_bo_priority         priority;
-       enum radeon_bo_priority         priority_constbuf;
        struct pipe_resource            **buffers; /* this has num_buffers elements */
 
+       enum radeon_bo_usage            shader_usage:4; /* READ, WRITE, or READWRITE */
+       enum radeon_bo_usage            shader_usage_constbuf:4;
+       enum radeon_bo_priority         priority:6;
+       enum radeon_bo_priority         priority_constbuf:6;
+
        /* The i-th bit is set if that element is enabled (non-NULL resource). */
        unsigned                        enabled_mask;
 };