[Mesa-dev] [PATCH 3/3] radeonsi/compute: Enable PIPE_SHADER_IR_NATIVE for compute shaders v2

Tom Stellard tom at stellard.net
Tue Oct 21 06:31:38 PDT 2014


On Mon, Oct 20, 2014 at 01:06:34PM +0900, Michel Dänzer wrote:
> On 17.10.2014 08:41, Tom Stellard wrote:
> >v2:
> >   - Drop dependency on LLVM >= 3.5.1
> 
> Have you tested this patch with LLVM < 3.6?

Yes, I tested them with 3.5 on both radeonsi and r600.

> 
> 
> >@@ -61,10 +66,7 @@ static void *si_create_compute_state(
> >  	struct si_context *sctx = (struct si_context *)ctx;
> >  	struct si_compute *program = CALLOC_STRUCT(si_compute);
> 
> [...]
> 
> >+	memset(&program->binary, 0, sizeof(program->binary));
> 
> Looks like this memset is redundant.
> 

Ok, I'll remove it.
> 
> >@@ -388,22 +415,12 @@ static void si_delete_compute_state(struct pipe_context *ctx, void* state){
> >  		return;
> >  	}
> >
> >-	if (program->kernels) {
> >-		for (int i = 0; i < program->num_kernels; i++){
> >-			if (program->kernels[i].bo){
> >-				si_shader_destroy(ctx, &program->kernels[i]);
> >-			}
> >-		}
> >-		FREE(program->kernels);
> >-	}
> >-
> >-	if (program->llvm_ctx){
> >-		LLVMContextDispose(program->llvm_ctx);
> >-	}
> 
> Is this really not necessary anymore? If not, it might be better to
> remove it in a separate patch.
> 

I think that is still need for the 3.5 path. I'll wrap an ifdef around it.

-Tom

> 
> Other than that, this patch looks good to me, and patch 1 is
> 
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
> 
> I haven't looked at patch 2 in detail.
> 
> 
> -- 
> Earthling Michel Dänzer            |                  http://www.amd.com
> Libre software enthusiast          |                Mesa and X developer
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list