From: Dave Airlie Date: Mon, 30 Nov 2015 04:38:18 +0000 (+1000) Subject: r600: add set_tess_state callback. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=420afe06d1374509b8628d48162a0294bae7a14b;p=mesa.git 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 --- 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,