[Mesa-dev] [PATCH 2/2] st/mesa: simplify returning GL_VENDOR
Marek Olšák
maraeo at gmail.com
Tue Jun 13 20:40:35 UTC 2017
Rb, anyone?
Thanks,
Marek
On Wed, Jun 7, 2017 at 10:09 PM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> src/mesa/state_tracker/st_cb_strings.c | 4 +---
> src/mesa/state_tracker/st_context.h | 2 --
> 2 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_strings.c b/src/mesa/state_tracker/st_cb_strings.c
> index 99d93a7..85fe5a7 100644
> --- a/src/mesa/state_tracker/st_cb_strings.c
> +++ b/src/mesa/state_tracker/st_cb_strings.c
> @@ -40,23 +40,21 @@
> #include "st_cb_strings.h"
>
> static const GLubyte *
> st_get_string(struct gl_context * ctx, GLenum name)
> {
> struct st_context *st = st_context(ctx);
> struct pipe_screen *screen = st->pipe->screen;
>
> switch (name) {
> case GL_VENDOR: {
> - const char *vendor = screen->get_vendor( screen );
> - util_snprintf(st->vendor, sizeof(st->vendor), "%s", vendor);
> - return (GLubyte *) st->vendor;
> + return (GLubyte *) screen->get_vendor(screen);
> }
>
> case GL_RENDERER:
> return (GLubyte *) screen->get_name(screen);
>
> default:
> return NULL;
> }
> }
>
> diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
> index 1756e57..6ca7ddb 100644
> --- a/src/mesa/state_tracker/st_context.h
> +++ b/src/mesa/state_tracker/st_context.h
> @@ -150,22 +150,20 @@ struct st_context
> boolean include;
> struct pipe_scissor_state rects[PIPE_MAX_WINDOW_RECTANGLES];
> } window_rects;
> unsigned sample_mask;
>
> GLuint poly_stipple[32]; /**< In OpenGL's bottom-to-top order */
>
> GLuint fb_orientation;
> } state;
>
> - char vendor[100];
> -
> uint64_t dirty; /**< dirty states */
>
> /** This masks out unused shader resources. Only valid in draw calls. */
> uint64_t active_states;
>
> /* If true, further analysis of states is required to know if something
> * has changed. Used mainly for shaders.
> */
> bool gfx_shaders_may_be_dirty;
> bool compute_shader_may_be_dirty;
> --
> 2.7.4
>
More information about the mesa-dev
mailing list