[Mesa-dev] [PATCH 04/12] nvc0: bind driver consts on buffer 15 for compute on Fermi
Samuel Pitoiset
samuel.pitoiset at gmail.com
Sun Feb 7 09:40:11 UTC 2016
On 02/07/2016 12:02 AM, Ilia Mirkin wrote:
> On Sat, Feb 6, 2016 at 5:38 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>> src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 13 ++++++++++---
>> src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 2 ++
>> 2 files changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
>> index 3ac7ce1..49a58ce 100644
>> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
>> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
>> @@ -236,10 +236,17 @@ nvc0_compute_upload_input(struct nvc0_context *nvc0, const void *input)
>> BEGIN_1IC0(push, NVC0_COMPUTE(CB_POS), 1 + cp->parm_size / 4);
>> PUSH_DATA (push, 0);
>> PUSH_DATAp(push, input, cp->parm_size / 4);
>> -
>> - BEGIN_NVC0(push, NVC0_COMPUTE(FLUSH), 1);
>> - PUSH_DATA (push, NVC0_COMPUTE_FLUSH_CB);
>> + } else {
>> + BEGIN_NVC0(push, NVC0_COMPUTE(CB_SIZE), 3);
>> + PUSH_DATA (push, 1024);
>> + PUSH_DATAh(push, nvc0->screen->uniform_bo->offset + (6 << 16) + (5 << 10));
>> + PUSH_DATA (push, nvc0->screen->uniform_bo->offset + (6 << 16) + (5 << 10));
>> + BEGIN_NVC0(push, NVC0_COMPUTE(CB_BIND), 1);
>> + PUSH_DATA (push, (15 << 8) | 1);
>> }
>
> Why are these two mutually exclusive? The driver constbufs should be
> always bound. And user parameters are only going to come in via the
> clover path. Not 100% sure how they're going to be used yet, but it
> does seem like they're going to be separate things...
User parameters also come in via the compute shader whichs read MP
performance counters. Well, binding the driver constbufs all the time
doesn't seem to be crazy though.
>
>> +
>> + BEGIN_NVC0(push, NVC0_COMPUTE(FLUSH), 1);
>> + PUSH_DATA (push, NVC0_COMPUTE_FLUSH_CB);
>> }
>>
>> void
>> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
>> index 93f211b..afcff53 100644
>> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
>> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
>> @@ -544,6 +544,8 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
>> info->io.texBindBase = NVE4_CP_INPUT_TEX(0);
>> info->io.suInfoBase = NVE4_CP_INPUT_SUF(0);
>> info->prop.cp.gridInfoBase = NVE4_CP_INPUT_GRID_INFO(0);
>> + } else {
>> + info->io.resInfoCBSlot = 15;
>> }
>> info->io.msInfoCBSlot = 0;
>> info->io.msInfoBase = NVE4_CP_INPUT_MS_OFFSETS;
>> --
>> 2.6.4
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list