glhd: Add test for logicop enable.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Thu, 24 Jun 2010 14:18:59 +0000 (07:18 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Thu, 24 Jun 2010 14:22:29 +0000 (07:22 -0700)
Only for first RT at the moment, as there is no trivial way in galahad
to look at framebuffer state and (sadly) people don't usually calloc
their CSOs, so flags could be wrongly set.

On the other hand, of course, galahad will hopefully encourage more
people to calloc their CSOs. :3

src/gallium/drivers/galahad/glhd_context.c

index 3b20cb1..ab6f17b 100644 (file)
@@ -188,6 +188,13 @@ galahad_create_blend_state(struct pipe_context *_pipe,
    struct galahad_context *glhd_pipe = galahad_context(_pipe);
    struct pipe_context *pipe = glhd_pipe->pipe;
 
+   if (blend->logicop_enable) {
+      if (blend->rt[0].blend_enable) {
+         glhd_warn("Blending enabled for render target 0, but logicops "
+            "are enabled");
+      }
+   }
+
    return pipe->create_blend_state(pipe,
                                    blend);
 }