diff options
author | Marek Olšák <[email protected]> | 2014-09-23 19:42:28 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-10-04 15:16:15 +0200 |
commit | 1f6c0b55df9f3553b18062ad2c7e2dc021d4c731 (patch) | |
tree | 0623f221ca34fc4cf9b4a8a69ea1c7a94783b5b6 /src/gallium/drivers/radeonsi/si_shader.c | |
parent | 68d36c0bb532987db27a596408e0326f20ca0365 (diff) |
radeonsi: set number of userdata SGPRs of GS copy shader to 4
It only needs the constant buffer with clip planes and read-write resources
for the GS->VS ring and streamout. That's 2 pointers.
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 4e8f80f20dc..8680824076b 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2402,8 +2402,8 @@ static void create_function(struct si_shader_context *si_shader_ctx) v8i32 = LLVMVectorType(i32, 8); v16i8 = LLVMVectorType(i8, 16); - params[SI_PARAM_CONST] = const_array(v16i8, SI_NUM_CONST_BUFFERS); params[SI_PARAM_RW_BUFFERS] = const_array(v16i8, SI_NUM_RW_BUFFERS); + params[SI_PARAM_CONST] = const_array(v16i8, SI_NUM_CONST_BUFFERS); params[SI_PARAM_SAMPLER] = const_array(v4i32, SI_NUM_SAMPLER_STATES); params[SI_PARAM_RESOURCE] = const_array(v8i32, SI_NUM_SAMPLER_VIEWS); last_array_pointer = SI_PARAM_RESOURCE; @@ -2415,10 +2415,16 @@ static void create_function(struct si_shader_context *si_shader_ctx) params[SI_PARAM_BASE_VERTEX] = i32; params[SI_PARAM_START_INSTANCE] = i32; num_params = SI_PARAM_START_INSTANCE+1; + if (shader->key.vs.as_es) { params[SI_PARAM_ES2GS_OFFSET] = i32; num_params++; } else { + if (shader->is_gs_copy_shader) { + last_array_pointer = SI_PARAM_CONST; + num_params = SI_PARAM_CONST+1; + } + /* The locations of the other parameters are assigned dynamically. */ /* Streamout SGPRs. */ @@ -2716,6 +2722,7 @@ static int si_generate_gs_copy_shader(struct si_screen *sscreen, outputs = MALLOC(gs->noutput * sizeof(outputs[0])); si_shader_ctx->type = TGSI_PROCESSOR_VERTEX; + shader->is_gs_copy_shader = true; radeon_llvm_context_init(&si_shader_ctx->radeon_bld); |