[Mesa-dev] [PATCH 1/5] nv50: implement a basic compute support

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Nov 16 02:50:39 PST 2015



On 11/16/2015 11:47 AM, Emil Velikov wrote:
> On 16 November 2015 at 10:39, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> Hi Samuel,
>>
>> On 13 November 2015 at 00:04, Samuel Pitoiset <samuel.pitoiset at gmail.com> wrote:
>>> This adds the ability to launch simple compute kernels like the one I
>>> will use to read out MP performance counters in the upcoming patch.
>>>
>>> This compute support is based on the work of Francisco Jerez (aka curro)
>>> that he did as part of his EVoC project in 2011/2012 to get OpenCL
>>> working on Tesla. His original work can be found here:
>>> https://github.com/curro/mesa/commits/nv50-compute
>>>
>>> I did some improvements on the original code, like fixing using both 3D
>>> and COMPUTE simultaneously, improving global buffers binding, and making
>>> the code closer to what nvc0 already does. This compute support has been
>>> tested by Pierre Moreau and myself with some compute kernels. This is a
>>> step towards OpenCL.
>>>
>>> Speaking about this, it seems like compute programs overlap fragment
>>> programs when they are used both. To fix this, we need to re-validate
>>> fragment programs when binding compute programs and vice versa.
>>>
>>> Note that, textures, samplers and surfaces still need to be implemented.
>>>
>>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>>> Tested-by: Pierre Moreau <pierre.morrow at free.fr>
>>> ---
>>>   src/gallium/drivers/nouveau/Makefile.sources       |   1 +
>>>   .../drivers/nouveau/codegen/nv50_ir_driver.h       |   1 +
>>>   src/gallium/drivers/nouveau/nv50/nv50_compute.c    | 332 +++++++++++++++
>>>   .../drivers/nouveau/nv50/nv50_compute.xml.h        | 444 +++++++++++++++++++++
>>>   src/gallium/drivers/nouveau/nv50/nv50_context.c    |  30 +-
>>>   src/gallium/drivers/nouveau/nv50/nv50_context.h    |  23 +-
>>>   src/gallium/drivers/nouveau/nv50/nv50_program.c    |  24 +-
>>>   src/gallium/drivers/nouveau/nv50/nv50_program.h    |   7 +
>>>   src/gallium/drivers/nouveau/nv50/nv50_screen.c     |  61 ++-
>>>   src/gallium/drivers/nouveau/nv50/nv50_screen.h     |   8 +
>>>   src/gallium/drivers/nouveau/nv50/nv50_state.c      |  99 +++++
>>>   11 files changed, 1021 insertions(+), 9 deletions(-)
>>>   create mode 100644 src/gallium/drivers/nouveau/nv50/nv50_compute.c
>>>   create mode 100644 src/gallium/drivers/nouveau/nv50/nv50_compute.xml.h
>>>
>>> diff --git a/src/gallium/drivers/nouveau/Makefile.sources b/src/gallium/drivers/nouveau/Makefile.sources
>>> index 83f8113..c2ff8e9 100644
>>> --- a/src/gallium/drivers/nouveau/Makefile.sources
>>> +++ b/src/gallium/drivers/nouveau/Makefile.sources
>>> @@ -64,6 +64,7 @@ NV50_C_SOURCES := \
>>>          nv50/nv50_3ddefs.xml.h \
>>>          nv50/nv50_3d.xml.h \
>>>          nv50/nv50_blit.h \
>>> +       nv50/nv50_compute.c \
>> Please add the header into the list
>> nv50/nv50_compute.xml.h
>>
> Ouch, did not see that you've pushed the series. No need to do
> anything - I've just committed a fix.

Thank you for doing this change. I really forgot that!

>
> -Emil
>

-- 
-Samuel


More information about the mesa-dev mailing list