summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_state.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-11-30 10:29:12 +1000
committerDave Airlie <[email protected]>2015-12-07 09:58:59 +1000
commit0b08a8ade6d50e93df357f183721fb3b700efd3a (patch)
treefe7f34d5ca6f039ec2b43a1401c688e9f5d9b5a7 /src/gallium/drivers/r600/evergreen_state.c
parentb2fa64b16166925200b09f7de62244358d22f0b7 (diff)
r600: add functions to update ls/hs state.
This just adds the two functions, these will get hooked up later in the shader code. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 0b7414627e5..ef605bdd720 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -3186,6 +3186,31 @@ void evergreen_update_vs_state(struct pipe_context *ctx, struct r600_pipe_shader
S_02881C_USE_VTX_RENDER_TARGET_INDX(rshader->vs_out_layer);
}
+void evergreen_update_hs_state(struct pipe_context *ctx, struct r600_pipe_shader *shader)
+{
+ struct r600_command_buffer *cb = &shader->command_buffer;
+ struct r600_shader *rshader = &shader->shader;
+
+ r600_init_command_buffer(cb, 32);
+ r600_store_context_reg(cb, R_0288BC_SQ_PGM_RESOURCES_HS,
+ S_0288BC_NUM_GPRS(rshader->bc.ngpr) |
+ S_0288BC_STACK_SIZE(rshader->bc.nstack));
+ r600_store_context_reg(cb, R_0288B8_SQ_PGM_START_HS,
+ shader->bo->gpu_address >> 8);
+}
+
+void evergreen_update_ls_state(struct pipe_context *ctx, struct r600_pipe_shader *shader)
+{
+ struct r600_command_buffer *cb = &shader->command_buffer;
+ struct r600_shader *rshader = &shader->shader;
+
+ r600_init_command_buffer(cb, 32);
+ r600_store_context_reg(cb, R_0288D4_SQ_PGM_RESOURCES_LS,
+ S_0288D4_NUM_GPRS(rshader->bc.ngpr) |
+ S_0288D4_STACK_SIZE(rshader->bc.nstack));
+ r600_store_context_reg(cb, R_0288D0_SQ_PGM_START_LS,
+ shader->bo->gpu_address >> 8);
+}
void *evergreen_create_resolve_blend(struct r600_context *rctx)
{
struct pipe_blend_state blend;