diff options
author | Dave Airlie <[email protected]> | 2015-11-30 14:38:18 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-12-07 09:59:00 +1000 |
commit | 420afe06d1374509b8628d48162a0294bae7a14b (patch) | |
tree | 61bb11706cc5037a1554ead0e1118b074cd7f1ff /src/gallium | |
parent | 7db24b740c14eb68e083cbc4c66648e790f31eaf (diff) |
r600: add set_tess_state callback.
This just stores the values in the context to be used later
when emitting the constant buffers.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index 7d7d8697aae..ad13d93d359 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -3605,6 +3605,16 @@ fallback: src, src_level, src_box); } +static void evergreen_set_tess_state(struct pipe_context *ctx, + const float default_outer_level[4], + const float default_inner_level[2]) +{ + struct r600_context *rctx = (struct r600_context *)ctx; + + memcpy(rctx->tess_state, default_outer_level, sizeof(float) * 4); + memcpy(rctx->tess_state+4, default_inner_level, sizeof(float) * 2); +} + void evergreen_init_state_functions(struct r600_context *rctx) { unsigned id = 1; @@ -3687,7 +3697,7 @@ void evergreen_init_state_functions(struct r600_context *rctx) rctx->b.b.set_polygon_stipple = evergreen_set_polygon_stipple; rctx->b.b.set_min_samples = evergreen_set_min_samples; rctx->b.b.set_scissor_states = evergreen_set_scissor_states; - + rctx->b.b.set_tess_state = evergreen_set_tess_state; if (rctx->b.chip_class == EVERGREEN) rctx->b.b.get_sample_position = evergreen_get_sample_position; else diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h index 3e6eca86752..068e2f8a302 100644 --- a/src/gallium/drivers/r600/r600_pipe.h +++ b/src/gallium/drivers/r600/r600_pipe.h @@ -521,6 +521,7 @@ struct r600_context { void *sb_context; struct r600_isa *isa; float sample_positions[4 * 16]; + float tess_state[8]; }; static inline void r600_emit_command_buffer(struct radeon_winsys_cs *cs, |