On Mon, Apr 28, 2014 at 08:27:07PM +0200, Marek Olšák wrote: > Please see my Mesa patch which moves index_bias to an SGPR. Doing it > conditionally would be messy. >
An alternative solution would be to give the function a target specific calling convention and then create and implement that calling convention in the driver. This way you would only need to put an ifdef around setting the function's calling convention. Also, I think it would be a good idea to add the maximum possible number or registers to the calling convention (i.e. the number or register we would use if all inputs are enabled and all user sgprs are being used). We can always add an optimized calling convention later that loads some of the parameters from a constant buffer. -Tom > Marek > > On Mon, Apr 28, 2014 at 11:40 AM, Michel Dänzer <mic...@daenzer.net> wrote: > > On 26.04.2014 22:36, Marek Olšák wrote: > >> From: Marek Olšák <marek.ol...@amd.com> > >> > >> Mesa needs one more SGPR, let's add 5 then, because it's a recurring issue. > >> > >> This is silly. Why cannot Mesa specify the calling convention? > >> Now I have to break transform feedback to support ARB_draw_indirect until > >> this patch is released. Or I'll have to wait until the release and then > >> merge ARB_draw_indirect support. > > > > Can't you do it the way we did several times before: Land the LLVM > > change, then land the Mesa change with the new functionality only > > enabled if built against LLVM >= 3.5? > > > > > > -- > > Earthling Michel Dänzer | http://www.amd.com > > Libre software enthusiast | Mesa and X developer > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev