[Mesa-dev] [PATCH] nvc0: enable compute support on Fermi

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Nov 6 02:53:43 PST 2015



On 11/06/2015 11:23 AM, Hans de Goede wrote:
> Hi,
>
> On 06-11-15 00:51, Samuel Pitoiset wrote:
>>
>>
>> On 11/06/2015 12:43 AM, Ilia Mirkin wrote:
>>> On Thu, Nov 5, 2015 at 6:41 PM, Samuel Pitoiset
>>> <samuel.pitoiset at gmail.com> wrote:
>>>> Altough the compute support is still not complete because textures and
>>>> surfaces need to be implemented, it allows to launch very simple
>>>> compute
>>>> kernel like one which reads reading MP performance counters.
>>>
>>> Didn't those end up breaking 3d rendering? Have you figured out what
>>> was overwriting what?
>>
>> This doesn't break any stuff related to 3D rendering. The compute
>> kernel for reading perf counters has been tested a lot on different
>> chips.
>>
>> The compute support is already enabled on Kepler and it doesn't seem
>> to break 3D rendering, btw.
>>
>> In the series which fixed those perf counters, I actually introduced a
>> bug which has been fixed since: fc5ae0c13f71f049065b1422c20491d2264ae164
>>
>>>
>>>>
>>>> This turns on PIPE_CAP_COMPUTE and PIPE_SHADER_COMPUTE.
>>>>
>>>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>>>> ---
>>>>   src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 4 +---
>>>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>>>
>>>> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
>>>> b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
>>>> index 7d96977..5b7b39b 100644
>>>> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
>>>> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
>>>> @@ -186,7 +186,7 @@ nvc0_screen_get_param(struct pipe_screen
>>>> *pscreen, enum pipe_cap param)
>>>>      case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
>>>>         return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
>>>>      case PIPE_CAP_COMPUTE:
>>>> -      return (class_3d == NVE4_3D_CLASS) ? 1 : 0;
>>>> +      return 1;
>>>
>>> Of course this also enables it for NVF0_3D_CLASS. Pretty sure compute
>>> doesn't work there for some dumb reason (like we're missing some in
>>> our ctxsw fw...)
>
> Hmm, my only compute capable card actually is a nvf0 card (gk208 based).
> Can you
> provide some quick test instructions how I can test compute on that card
> (with the patch from this thread applied) ?
>
> And if it does not work, any suggestions how to go about debugging this ?
> Or better any info I can provide to help you debug this :)
>

Unfortunately, the compute support is only supported on Fermi and Kepler 
(< GK110).

I could have a look and implement it for your card but since I don't 
have this chipset, this is not going to be easy.

Anyway, the first step is to trace what the blob does using 
valgrind-mmt. Basically, the vectorAdd sample in CUDA should do the job

http://nouveau.freedesktop.org/wiki/Valgrind-mmt/

Once it's done, please send me the MMT trace.

But the quickest way for you to test that compute support would be to 
have a chip < GK110 :-)

> Regards,
>
> Hans

-- 
-Samuel


More information about the mesa-dev mailing list