[Mesa-dev] [PATCH 1/3] gallium/drivers: support more sampler views than samplers for more drivers
Brian Paul
brian.e.paul at gmail.com
Sun Dec 1 04:09:10 PST 2013
Reviewed-by: Brian Paul <brianp at vmware.com>
On Mon, Nov 25, 2013 at 7:43 PM, <sroland at vmware.com> wrote:
> From: Roland Scheidegger <sroland at vmware.com>
>
> This adds support for this to more drivers, in particular for all the
> "special"
> ones useful for debugging.
> HW drivers are left alone, some should be able to support it if they want
> but
> they may not be interested at this point.
> ---
> src/gallium/drivers/galahad/glhd_context.c | 2 +-
> src/gallium/drivers/identity/id_context.c | 2 +-
> src/gallium/drivers/rbug/rbug_context.c | 2 +-
> src/gallium/drivers/rbug/rbug_context.h | 4 ++--
> src/gallium/drivers/rbug/rbug_core.c | 2 +-
> src/gallium/drivers/trace/tr_context.c | 2 +-
> 6 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/src/gallium/drivers/galahad/glhd_context.c
> b/src/gallium/drivers/galahad/glhd_context.c
> index 0bb7abd..fa743bd 100644
> --- a/src/gallium/drivers/galahad/glhd_context.c
> +++ b/src/gallium/drivers/galahad/glhd_context.c
> @@ -518,7 +518,7 @@ galahad_context_set_sampler_views(struct pipe_context
> *_pipe,
> {
> struct galahad_context *glhd_pipe = galahad_context(_pipe);
> struct pipe_context *pipe = glhd_pipe->pipe;
> - struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
> + struct pipe_sampler_view
> *unwrapped_views[PIPE_MAX_SHADER_SAMPLER_VIEWS];
> unsigned i;
>
> for (i = 0; i < num; i++)
> diff --git a/src/gallium/drivers/identity/id_context.c
> b/src/gallium/drivers/identity/id_context.c
> index 60e8860..00414b8 100644
> --- a/src/gallium/drivers/identity/id_context.c
> +++ b/src/gallium/drivers/identity/id_context.c
> @@ -485,7 +485,7 @@ identity_set_sampler_views(struct pipe_context *_pipe,
> {
> struct identity_context *id_pipe = identity_context(_pipe);
> struct pipe_context *pipe = id_pipe->pipe;
> - struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
> + struct pipe_sampler_view
> *unwrapped_views[PIPE_MAX_SHADER_SAMPLER_VIEWS];
> unsigned i;
>
> for (i = 0; i < num; i++)
> diff --git a/src/gallium/drivers/rbug/rbug_context.c
> b/src/gallium/drivers/rbug/rbug_context.c
> index be3e964..0e7badb 100644
> --- a/src/gallium/drivers/rbug/rbug_context.c
> +++ b/src/gallium/drivers/rbug/rbug_context.c
> @@ -712,7 +712,7 @@ rbug_set_sampler_views(struct pipe_context *_pipe,
> {
> struct rbug_context *rb_pipe = rbug_context(_pipe);
> struct pipe_context *pipe = rb_pipe->pipe;
> - struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
> + struct pipe_sampler_view
> *unwrapped_views[PIPE_MAX_SHADER_SAMPLER_VIEWS];
> struct pipe_sampler_view **views = NULL;
> unsigned i;
>
> diff --git a/src/gallium/drivers/rbug/rbug_context.h
> b/src/gallium/drivers/rbug/rbug_context.h
> index 6b44da0..5e7b9d4 100644
> --- a/src/gallium/drivers/rbug/rbug_context.h
> +++ b/src/gallium/drivers/rbug/rbug_context.h
> @@ -48,8 +48,8 @@ struct rbug_context {
> struct {
> struct rbug_shader *shader[PIPE_SHADER_TYPES];
>
> - struct rbug_sampler_view
> *views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
> - struct rbug_resource *texs[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS];
> + struct rbug_sampler_view
> *views[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_SAMPLER_VIEWS];
> + struct rbug_resource
> *texs[PIPE_SHADER_TYPES][PIPE_MAX_SHADER_SAMPLER_VIEWS];
> unsigned num_views[PIPE_SHADER_TYPES];
>
> unsigned nr_cbufs;
> diff --git a/src/gallium/drivers/rbug/rbug_core.c
> b/src/gallium/drivers/rbug/rbug_core.c
> index b957261..8f9388a 100644
> --- a/src/gallium/drivers/rbug/rbug_core.c
> +++ b/src/gallium/drivers/rbug/rbug_core.c
> @@ -320,7 +320,7 @@ rbug_context_info(struct rbug_rbug *tr_rbug, struct
> rbug_header *header, uint32_
> struct rbug_screen *rb_screen = tr_rbug->rb_screen;
> struct rbug_context *rb_context = NULL;
> rbug_texture_t cbufs[PIPE_MAX_COLOR_BUFS];
> - rbug_texture_t texs[PIPE_MAX_SAMPLERS];
> + rbug_texture_t texs[PIPE_MAX_SHADER_SAMPLER_VIEWS];
> unsigned i;
>
> pipe_mutex_lock(rb_screen->list_mutex);
> diff --git a/src/gallium/drivers/trace/tr_context.c
> b/src/gallium/drivers/trace/tr_context.c
> index 78911aa..6a98657 100644
> --- a/src/gallium/drivers/trace/tr_context.c
> +++ b/src/gallium/drivers/trace/tr_context.c
> @@ -891,7 +891,7 @@ trace_context_set_sampler_views(struct pipe_context
> *_pipe,
> struct trace_context *tr_ctx = trace_context(_pipe);
> struct trace_sampler_view *tr_view;
> struct pipe_context *pipe = tr_ctx->pipe;
> - struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
> + struct pipe_sampler_view
> *unwrapped_views[PIPE_MAX_SHADER_SAMPLER_VIEWS];
> unsigned i;
>
> /* remove this when we have pipe->set_sampler_views(..., start, ...) */
> --
> 1.7.9.5
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131201/f0c2a088/attachment-0001.html>
More information about the mesa-dev
mailing list