From e086f64d3936f496acf41c8b2aa276f09eed6a62 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 9 Jul 2020 23:52:56 +0200 Subject: [PATCH] nvc0: set local mem size for compute on gv100 This is required when the shader uses local memory for arrays or spills. I really dislike how it's done right now, but oh well, it's the same for other gens. Fixes CTS tests: KHR-GL46.shading_language_420pack.binding_image_array KHR-GL46.shading_language_420pack.length_of_compute_result Signed-off-by: Karol Herbst Part-of: --- src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c index d4687b652ba..89c9406ea14 100644 --- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c +++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c @@ -762,6 +762,10 @@ gv100_compute_setup_launch_desc(struct nvc0_context *nvc0, u32 *qmd, NVC3C0_QMDV02_02_DEF_SET(qmd, SAMPLER_INDEX, VIA_HEADER_INDEX); NVC3C0_QMDV02_02_VAL_SET(qmd, SHARED_MEMORY_SIZE, align(cp->cp.smem_size, 0x100)); + NVC3C0_QMDV02_02_VAL_SET(qmd, SHADER_LOCAL_MEMORY_LOW_SIZE, + (cp->hdr[1] & 0xfffff0) + + align(cp->cp.lmem_size, 0x10)); + NVC3C0_QMDV02_02_VAL_SET(qmd, SHADER_LOCAL_MEMORY_HIGH_SIZE, 0); NVC3C0_QMDV02_02_VAL_SET(qmd, MIN_SM_CONFIG_SHARED_MEM_SIZE, gv100_sm_config_smem_size(8 * 1024)); NVC3C0_QMDV02_02_VAL_SET(qmd, MAX_SM_CONFIG_SHARED_MEM_SIZE, -- 2.30.2