Mesa (master): u_blitter: create basic fs shaders in util_blitter_cache_all_shaders()

Brian Paul brianp at kemper.freedesktop.org
Wed Oct 22 23:34:50 UTC 2014


Module: Mesa
Branch: master
Commit: 0bcd9f5469868748ce3b1bb8ddab55d9859e96c4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0bcd9f5469868748ce3b1bb8ddab55d9859e96c4

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Oct 21 12:14:06 2014 -0600

u_blitter: create basic fs shaders in util_blitter_cache_all_shaders()

We need to create all fs shaders in this function.

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/auxiliary/util/u_blitter.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c
index abcacff..830d82f 100644
--- a/src/gallium/auxiliary/util/u_blitter.c
+++ b/src/gallium/auxiliary/util/u_blitter.c
@@ -1012,7 +1012,8 @@ void *blitter_get_fs_texfetch_stencil(struct blitter_context_priv *ctx,
 void util_blitter_cache_all_shaders(struct blitter_context *blitter)
 {
    struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter;
-   struct pipe_screen *screen = blitter->pipe->screen;
+   struct pipe_context *pipe = blitter->pipe;
+   struct pipe_screen *screen = pipe->screen;
    unsigned samples, j, f, target, max_samples;
    boolean has_arraytex, has_cubearraytex;
 
@@ -1073,6 +1074,16 @@ void util_blitter_cache_all_shaders(struct blitter_context *blitter)
       }
    }
 
+   ctx->fs_empty = util_make_empty_fragment_shader(pipe);
+
+   ctx->fs_write_one_cbuf =
+      util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
+                                            TGSI_INTERPOLATE_CONSTANT, FALSE);
+
+   ctx->fs_write_all_cbufs =
+      util_make_fragment_passthrough_shader(pipe, TGSI_SEMANTIC_GENERIC,
+                                            TGSI_INTERPOLATE_CONSTANT, TRUE);
+
    ctx->cached_all_shaders = TRUE;
 }
 




More information about the mesa-commit mailing list