scons: rename PIPE_SUBSYSTEM_EMBEDDED to EMBEDDED_DEVICE
[mesa.git] / src / gallium / drivers / llvmpipe / lp_context.c
index 9a1a7b9ad5f05473671f331a4daedb2e8cddc774..016416e01163c7f5ed5202a4a0328936456ec39c 100644 (file)
@@ -48,7 +48,7 @@
 #include "lp_setup.h"
 
 /* This is only safe if there's just one concurrent context */
-#ifdef PIPE_SUBSYSTEM_EMBEDDED
+#ifdef EMBEDDED_DEVICE
 #define USE_GLOBAL_LLVM_CONTEXT
 #endif
 
@@ -96,7 +96,7 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
    }
 
    for (i = 0; i < llvmpipe->num_vertex_buffers; i++) {
-      pipe_resource_reference(&llvmpipe->vertex_buffer[i].buffer, NULL);
+      pipe_vertex_buffer_unreference(&llvmpipe->vertex_buffer[i]);
    }
 
    lp_delete_setup_variants(llvmpipe);
@@ -119,10 +119,10 @@ do_flush( struct pipe_context *pipe,
 
 
 static void
-llvmpipe_render_condition ( struct pipe_context *pipe,
-                            struct pipe_query *query,
-                            boolean condition,
-                            uint mode )
+llvmpipe_render_condition(struct pipe_context *pipe,
+                          struct pipe_query *query,
+                          bool condition,
+                          enum pipe_render_cond_flag mode)
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
 
@@ -227,6 +227,12 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
 
    lp_reset_counters();
 
+   /* If llvmpipe_set_scissor_states() is never called, we still need to
+    * make sure that derived scissor state is computed.
+    * See https://bugs.freedesktop.org/show_bug.cgi?id=101709
+    */
+   llvmpipe->dirty |= LP_NEW_SCISSOR;
+
    return &llvmpipe->pipe;
 
  fail: