[Mesa-dev] [PATCH v2 08/25] st/mesa: enable ARB_sparse_buffer when supported

Nicolai Hähnle nhaehnle at gmail.com
Tue Mar 28 09:11:58 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
 src/mesa/state_tracker/st_extensions.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 16f8685..d363cef 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -454,20 +454,23 @@ void st_init_limits(struct pipe_screen *screen,
     * PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS has the same
     * number of layers as we need, although we technically
     * could have more the generality is not really useful
     * in practicality.
     */
    c->MaxFramebufferLayers =
       screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS);
 
    c->MaxWindowRectangles =
       screen->get_param(screen, PIPE_CAP_MAX_WINDOW_RECTANGLES);
+
+   c->SparseBufferPageSize =
+      screen->get_param(screen, PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE);
 }
 
 
 /**
  * Given a member \c x of struct gl_extensions, return offset of
  * \c x in bytes.
  */
 #define o(x) offsetof(struct gl_extensions, x)
 
 
@@ -598,20 +601,21 @@ void st_init_extensions(struct pipe_screen *screen,
       { o(ARB_query_buffer_object),          PIPE_CAP_QUERY_BUFFER_OBJECT              },
       { o(ARB_robust_buffer_access_behavior), PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR   },
       { o(ARB_sample_shading),               PIPE_CAP_SAMPLE_SHADING                   },
       { o(ARB_seamless_cube_map),            PIPE_CAP_SEAMLESS_CUBE_MAP                },
       { o(ARB_shader_draw_parameters),       PIPE_CAP_DRAW_PARAMETERS                  },
       { o(ARB_shader_group_vote),            PIPE_CAP_TGSI_VOTE                        },
       { o(ARB_shader_stencil_export),        PIPE_CAP_SHADER_STENCIL_EXPORT            },
       { o(ARB_shader_texture_image_samples), PIPE_CAP_TGSI_TXQS                        },
       { o(ARB_shader_texture_lod),           PIPE_CAP_SM3                              },
       { o(ARB_shadow),                       PIPE_CAP_TEXTURE_SHADOW_MAP               },
+      { o(ARB_sparse_buffer),                PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE          },
       { o(ARB_texture_buffer_object),        PIPE_CAP_TEXTURE_BUFFER_OBJECTS           },
       { o(ARB_texture_cube_map_array),       PIPE_CAP_CUBE_MAP_ARRAY                   },
       { o(ARB_texture_gather),               PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS    },
       { o(ARB_texture_mirror_clamp_to_edge), PIPE_CAP_TEXTURE_MIRROR_CLAMP             },
       { o(ARB_texture_multisample),          PIPE_CAP_TEXTURE_MULTISAMPLE              },
       { o(ARB_texture_non_power_of_two),     PIPE_CAP_NPOT_TEXTURES                    },
       { o(ARB_texture_query_lod),            PIPE_CAP_TEXTURE_QUERY_LOD                },
       { o(ARB_texture_view),                 PIPE_CAP_SAMPLER_VIEW_TARGET              },
       { o(ARB_timer_query),                  PIPE_CAP_QUERY_TIMESTAMP                  },
       { o(ARB_transform_feedback2),          PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME       },
-- 
2.9.3



More information about the mesa-dev mailing list