summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_setup.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2012-12-05 06:50:07 +1000
committerDave Airlie <[email protected]>2012-12-06 14:48:10 +1000
commit77b26564c3f0395bf3e744abbf6d0e7aa9d2c8da (patch)
treeb592e6ecfdfad109ee33e1de801f144033175ea1 /src/gallium/drivers/llvmpipe/lp_setup.c
parent71f06344a0d72a6bd27750ceca571fc016b8de85 (diff)
llvmpipe: EXT_transform_feedback support (v1.1)
I'd written most of this ages ago, but never finished it off. This passes 115/130 piglit tests so far. I'll look into the others as time permits. v1.1: fix calloc return check as suggested by Jose. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c
index 1d71a87319e..25e5da84ebb 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup.c
@@ -65,7 +65,9 @@ static boolean try_update_scene_state( struct lp_setup_context *setup );
static void
lp_setup_get_empty_scene(struct lp_setup_context *setup)
{
+ struct llvmpipe_context *lp = llvmpipe_context(setup->pipe);
assert(setup->scene == NULL);
+ boolean discard = lp->rasterizer ? lp->rasterizer->rasterizer_discard : FALSE;
setup->scene_idx++;
setup->scene_idx %= Elements(setup->scenes);
@@ -80,7 +82,7 @@ lp_setup_get_empty_scene(struct lp_setup_context *setup)
lp_fence_wait(setup->scene->fence);
}
- lp_scene_begin_binning(setup->scene, &setup->fb);
+ lp_scene_begin_binning(setup->scene, &setup->fb, discard);
}
@@ -620,6 +622,13 @@ lp_setup_set_flatshade_first( struct lp_setup_context *setup,
setup->flatshade_first = flatshade_first;
}
+void
+lp_setup_set_rasterizer_discard( struct lp_setup_context *setup,
+ boolean rasterizer_discard )
+{
+ setup->rasterizer_discard = rasterizer_discard;
+ set_scene_state( setup, SETUP_FLUSHED, __FUNCTION__ );
+}
void
lp_setup_set_vertex_info( struct lp_setup_context *setup,
@@ -1057,6 +1066,7 @@ lp_setup_create( struct pipe_context *pipe,
struct llvmpipe_screen *screen = llvmpipe_screen(pipe->screen);
struct lp_setup_context *setup;
unsigned i;
+ struct llvmpipe_context *lp = llvmpipe_context(pipe);
setup = CALLOC_STRUCT(lp_setup_context);
if (!setup) {