[Mesa-dev] [PATCH 1/3] gallium/st: Use driver name to access driconf
Brian Paul
brianp at vmware.com
Wed Aug 22 07:37:15 PDT 2012
On 08/22/2012 02:23 AM, Maxim Levitsky wrote:
> From: Carl-Philip Haensch<Carl-Philip.Haensch at mailbox.tu-dresden.de>
>
> This fixes fetching driconf options from the gallium drivers.
>
> Patch written by, Carl-Philip Haensch
> (http://lists.freedesktop.org/archives/mesa-dev/2011-May/007743.html)
>
> Signed-off-by: Maxim Levitsky<maximlevitsky at gmail.com>
> ---
> .../state_trackers/dri/common/dri_context.c | 5 +++--
> src/gallium/targets/dri-swrast/swrast_drm_api.c | 3 +++
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
> index e07e168..dd23304 100644
> --- a/src/gallium/state_trackers/dri/common/dri_context.c
> +++ b/src/gallium/state_trackers/dri/common/dri_context.c
> @@ -37,6 +37,7 @@
>
> #include "pipe/p_context.h"
> #include "state_tracker/st_context.h"
> +#include "state_tracker/drm_driver.h"
>
> static void
> dri_pp_query(struct dri_context *ctx)
> @@ -103,8 +104,8 @@ dri_create_context(gl_api api, const struct gl_config * visual,
> ctx->cPriv = cPriv;
> ctx->sPriv = sPriv;
>
> - driParseConfigFiles(&ctx->optionCache,
> - &screen->optionCache, sPriv->myNum, "dri");
> + driParseConfigFiles(&ctx->optionCache,&screen->optionCache,
> + sPriv->myNum, driver_descriptor.name);
>
> dri_fill_st_visual(&attribs.visual, screen, visual);
> ctx->st = stapi->create_context(stapi,&screen->base,&attribs,&ctx_err,
> diff --git a/src/gallium/targets/dri-swrast/swrast_drm_api.c b/src/gallium/targets/dri-swrast/swrast_drm_api.c
> index 8d741c6..d11de61 100644
> --- a/src/gallium/targets/dri-swrast/swrast_drm_api.c
> +++ b/src/gallium/targets/dri-swrast/swrast_drm_api.c
> @@ -29,10 +29,13 @@
> #include "pipe/p_compiler.h"
> #include "util/u_memory.h"
> #include "dri_sw_winsys.h"
> +#include "state_tracker/drm_driver.h"
>
> #include "target-helpers/inline_debug_helper.h"
> #include "target-helpers/inline_sw_helper.h"
>
> +PUBLIC
> +DRM_DRIVER_DESCRIPTOR("swrast", NULL, NULL, NULL);
>
> struct pipe_screen *
> drisw_create_screen(struct drisw_loader_funcs *lf)
Looks OK to me.
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list