gallium/drivers: support more sampler views than samplers for more drivers
authorRoland Scheidegger <sroland@vmware.com>
Tue, 26 Nov 2013 01:30:13 +0000 (02:30 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Thu, 28 Nov 2013 03:01:54 +0000 (04:01 +0100)
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.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/galahad/glhd_context.c
src/gallium/drivers/identity/id_context.c
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/rbug/rbug_context.h
src/gallium/drivers/rbug/rbug_core.c
src/gallium/drivers/trace/tr_context.c

index 0bb7abd3ac0e00dae5e5bea7dba0616f53e383ae..fa743bd1562e790f15d984518c74ca00a0d7afbe 100644 (file)
@@ -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++)
index 60e8860a2cbb21a1a3c2c3b4e406dd888518aff9..00414b89624e61bafcd4ebf1f3b50d04381b4606 100644 (file)
@@ -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++)
index be3e9641d6d75d7481b9a3d637a50048eaa5e934..0e7badb1d0fe7abe36cb4311a11846b53982dcd5 100644 (file)
@@ -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;
 
index 6b44da0de6aa5b3cc83d82d6d2662edcec0d0ce6..5e7b9d4dee4525fbdd3bcfc8b19fec260dee500e 100644 (file)
@@ -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;
index b957261b9ee1c0fff0634a5c688736f5a68e097c..8f9388ad829117bd59fd90f53a2d123f9db2f6a1 100644 (file)
@@ -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);
index 78911aa8f5e07e807cef8665b0c86b82958a26d8..6a986571e74614f6cc669e73fe407555d93f255e 100644 (file)
@@ -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, ...) */