summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-19 03:15:52 +0200
committerMarek Olšák <[email protected]>2017-04-28 21:47:35 +0200
commite3caa1cd36a23a73028fb3c70930546b01ad0ac1 (patch)
tree0055fd22fdeef7a6ac5487b230afd230a3c8b451 /src
parent021e65640e632294d90f4eeb265a7be87ce2d84e (diff)
radeonsi: simplify some shader type conditions
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_shader.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 62dc9e2fcee..5ce04d67f38 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -6084,7 +6084,7 @@ static void create_function(struct si_shader_context *ctx)
"ddxy_lds",
LOCAL_ADDR_SPACE);
- if ((ctx->type == PIPE_SHADER_VERTEX && shader->key.as_ls) ||
+ if (shader->key.as_ls ||
ctx->type == PIPE_SHADER_TESS_CTRL)
declare_tess_lds(ctx);
}
@@ -6101,11 +6101,7 @@ static void preload_ring_buffers(struct si_shader_context *ctx)
LLVMValueRef buf_ptr = LLVMGetParam(ctx->main_fn,
ctx->param_rw_buffers);
- if ((ctx->type == PIPE_SHADER_VERTEX &&
- ctx->shader->key.as_es) ||
- (ctx->type == PIPE_SHADER_TESS_EVAL &&
- ctx->shader->key.as_es) ||
- ctx->type == PIPE_SHADER_GEOMETRY) {
+ if (ctx->shader->key.as_es || ctx->type == PIPE_SHADER_GEOMETRY) {
unsigned ring =
ctx->type == PIPE_SHADER_GEOMETRY ? SI_GS_RING_ESGS
: SI_ES_RING_ESGS;