The patch fixes the bug 25863.
The bug happens when i use blend types like multiply, screen, dark in
vega state tracker.

--- a/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -244,7 +244,7 @@ softpipe_reset_sampler_varients(struct
softpipe_context *softpipe)
     * fragment programs.
     */
    for (i = 0; i <= softpipe->vs->max_sampler; i++) {
-      if (softpipe->vertex_samplers[i]) {
+      if (softpipe->vertex_samplers[i] && softpipe->vertex_textures[i]) {
          softpipe->tgsi.vert_samplers_list[i] =
             get_sampler_varient( i,
                                 sp_sampler(softpipe->vertex_samplers[i]),
@@ -258,7 +258,7 @@ softpipe_reset_sampler_varients(struct
softpipe_context *softpipe)
    }

    for (i = 0; i <= softpipe->fs->info.file_max[TGSI_FILE_SAMPLER]; i++) {
-      if (softpipe->sampler[i]) {
+      if (softpipe->sampler[i] && softpipe->texture[i]) {
          softpipe->tgsi.frag_samplers_list[i] =
             get_sampler_varient( i,
                                  sp_sampler(softpipe->sampler[i]),
--
1.6.3.3
From de90e3f7e53e593a84a89b0a97cbd5cbe08c4a6b Mon Sep 17 00:00:00 2001
From: Igor Oliveira <igor.olive...@openbossa.org>
Date: Sun, 24 Jan 2010 22:31:06 -0400
Subject: [PATCH] Fix softpipe_reset_sampler_varients, check if the sampler has a texture
 != NULL. It fixes the bug 25863

---
 src/gallium/drivers/softpipe/sp_state_sampler.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_state_sampler.c b/src/gallium/drivers/softpipe/sp_state_sampler.c
index ceb4e33..ddc8c3c 100644
--- a/src/gallium/drivers/softpipe/sp_state_sampler.c
+++ b/src/gallium/drivers/softpipe/sp_state_sampler.c
@@ -244,7 +244,7 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
     * fragment programs.
     */
    for (i = 0; i <= softpipe->vs->max_sampler; i++) {
-      if (softpipe->vertex_samplers[i]) {
+      if (softpipe->vertex_samplers[i] && softpipe->vertex_textures[i]) {
          softpipe->tgsi.vert_samplers_list[i] = 
             get_sampler_varient( i,
                                 sp_sampler(softpipe->vertex_samplers[i]),
@@ -258,7 +258,7 @@ softpipe_reset_sampler_varients(struct softpipe_context *softpipe)
    }
 
    for (i = 0; i <= softpipe->fs->info.file_max[TGSI_FILE_SAMPLER]; i++) {
-      if (softpipe->sampler[i]) {
+      if (softpipe->sampler[i] && softpipe->texture[i]) {
          softpipe->tgsi.frag_samplers_list[i] =
             get_sampler_varient( i,
                                  sp_sampler(softpipe->sampler[i]),
-- 
1.6.3.3

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to