All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Pitoiset <samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: "nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH mesa 3/3] nouveau: Add support for clover / OpenCL kernel input parameters
Date: Thu, 10 Mar 2016 17:03:55 +0100	[thread overview]
Message-ID: <56E19AEB.3060606@gmail.com> (raw)
In-Reply-To: <CAKb7UvhrroOY2ShG_XcoPB+TRF2NpLAmV+QWdw88B3o1Unhe0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Looks fine, except that you will need to lower FILE_SHADER_INPUT to 
FILE_MEMORY_SHARED for Tesla because input kernel parameters are located 
at s[0x10]. No need to do this for Fermi+ because it's already lowered 
to c0[]. Note that input kernel parameters will be probably sticked on 
c7[] after my changes but that doesn't change anything for you.

I already have a patch for the nv50 bits btw, maybe it's the right time 
to send it?

https://cgit.freedesktop.org/~hakzsam/mesa/commit/?h=compute&id=640d68009bcf93c1814cee0b1a12939cb85e5895

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

On 03/10/2016 04:43 PM, Ilia Mirkin wrote:
> On Thu, Mar 10, 2016 at 10:27 AM, Samuel Pitoiset
> <samuel.pitoiset@gmail.com> wrote:
>>
>>
>> On 03/10/2016 04:23 PM, Ilia Mirkin wrote:
>>>
>>> On Thu, Mar 10, 2016 at 10:14 AM, Hans de Goede <hdegoede@redhat.com>
>>> wrote:
>>>>
>>>> Add support for clover / OpenCL kernel input parameters.
>>>>
>>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>>> ---
>>>>    .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp      | 18
>>>> +++++++++++++++---
>>>>    1 file changed, 15 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>>>> b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>>>> index a8258af..de0c72b 100644
>>>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>>>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
>>>> @@ -1523,9 +1523,21 @@ Converter::makeSym(uint tgsiFile, int fileIdx, int
>>>> idx, int c, uint32_t address)
>>>>
>>>>       sym->reg.fileIndex = fileIdx;
>>>>
>>>> -   if (tgsiFile == TGSI_FILE_MEMORY &&
>>>> -       code->memoryFiles[fileIdx].mem_type == TGSI_MEMORY_TYPE_SHARED)
>>>> -      sym->setFile(FILE_MEMORY_SHARED);
>>>> +   if (tgsiFile == TGSI_FILE_MEMORY) {
>>>> +      switch (code->memoryFiles[fileIdx].mem_type) {
>>>> +      case TGSI_MEMORY_TYPE_SHARED:
>>>> +         sym->setFile(FILE_MEMORY_SHARED);
>>>> +         break;
>>>> +      case TGSI_MEMORY_TYPE_INPUT:
>>>> +         assert(prog->getType() == Program::TYPE_COMPUTE);
>>>> +         assert(idx == -1);
>>>> +         sym->setFile(FILE_SHADER_INPUT);
>>>> +         address += info->prop.cp.inputOffset;
>>>
>>>
>>> What's the idea here? i.e. what is the inputOffset, how is it set, and
>>> why?
>>
>>
>> I don't get the idea too, btw.
>>
>> But prop.cp.inputOffset is only defined for compute on Kepler. It's the
>> offset of input parameters in the screen->parm BO but as you already know,
>> it is going to be removed because the idea is to use screen->uniform_bo
>> instead. I'll do this change *after* the compute shaders support on Kepler.
>
> Actually looks like it's only set for nv50 that I can see, shifting
> things over by 0x10. It used to be reflected by getResourceBase, but
> we broke that abstraction... might be nice to get it back somehow,
> perhaps by sending more arguments down to getResourceBase? Either way,
> that can be done later. This patch is
>
> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
>

-- 
-Samuel
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2016-03-10 16:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 15:14 [PATCH mesa 0/3] tgsi and nouveau global / local / opencl-input mem support Hans de Goede
     [not found] ` <1457622887-19328-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-10 15:14   ` [PATCH mesa 1/3] tgsi: Fix decl.Atomic and .Shared not propagating when parsing tgsi text Hans de Goede
     [not found]     ` <1457622887-19328-2-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-10 15:24       ` Ilia Mirkin
2016-03-10 15:25     ` Samuel Pitoiset
2016-03-10 15:14 ` [PATCH mesa 2/3] tgsi: Add support for global / local / input MEMORY Hans de Goede
     [not found]   ` <1457622887-19328-3-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-03-10 15:28     ` Ilia Mirkin
2016-03-10 15:35   ` Aaron Watry
2016-03-10 18:43     ` Hans de Goede
2016-03-10 15:14 ` [PATCH mesa 3/3] nouveau: Add support for clover / OpenCL kernel input parameters Hans de Goede
2016-03-10 15:23   ` Ilia Mirkin
2016-03-10 15:27     ` Samuel Pitoiset
     [not found]       ` <56E19271.7070704-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-10 15:43         ` Ilia Mirkin
2016-03-10 15:46           ` Samuel Pitoiset
     [not found]           ` <CAKb7UvhrroOY2ShG_XcoPB+TRF2NpLAmV+QWdw88B3o1Unhe0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-10 16:03             ` Samuel Pitoiset [this message]
     [not found]               ` <56E19AEB.3060606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-10 17:54                 ` Hans de Goede
2016-03-10 16:03       ` [Nouveau] " Pierre Moreau
2016-03-10 16:05         ` Ilia Mirkin
2016-03-10 16:13           ` Pierre Moreau
2016-03-10 16:05         ` Samuel Pitoiset
     [not found]           ` <56E19B67.3030306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-10 16:06             ` Ilia Mirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E19AEB.3060606@gmail.com \
    --to=samuel.pitoiset-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
    --cc=mesa-dev-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.