Summary: | [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Drivers/DRI/nouveau | Assignee: | Nouveau Project <nouveau> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Vinson Lee
2013-09-10 00:45:15 UTC
OK, so there are a few problems here, not the least of which is that there's memory corruption in the program logic because nv50_program only has 16 in/out varyings, but it reports support for a lot more than that. Once you fix that, there's another incorrect assert. Fixing that makes the test run, but it fails. For posterity, here is the patch that makes the test not-completely-die. I'll look into what the test is doing and why it's failing later. diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 762b48f..167d228 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -223,9 +223,7 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH: return 4; case PIPE_SHADER_CAP_MAX_INPUTS: - if (shader == PIPE_SHADER_VERTEX) - return 32; - return 0x300 / 16; + return 16; case PIPE_SHADER_CAP_MAX_CONSTS: return 65536 / 16; case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c index ba4f592..a7f7a36 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c @@ -443,14 +443,15 @@ nv50_fp_linkage_validate(struct nv50_context *nv50) } n = (m + 3) / 4; - assert(m <= 64); if (unlikely(nv50->gmtyprog)) { + assert(n <= 33); BEGIN_NV04(push, NV50_3D(GP_RESULT_MAP_SIZE), 1); PUSH_DATA (push, m); BEGIN_NV04(push, NV50_3D(GP_RESULT_MAP(0)), n); PUSH_DATAp(push, map, n); } else { + assert(n <= 17); // XXX use the nva3+ ALT version? BEGIN_NV04(push, NV50_3D(VP_GP_BUILTIN_ATTR_EN), 1); PUSH_DATA (push, vp->vp.attrs[2]); Looks like making it report 15 instead of 0x300/16 makes piglit (and valgrind) happy. Just sent a patch that did that. OK, a patch to make it return 15 has been checked in. This corresponds to returning 60 for the max varying floats thing, which in turn is what the blob reports on my hardware. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.