Summary: | [i965] Assertion `c->nr_refs < ((1024*3 + FRAG_ATTRIB_MAX + 3) * 4)' failed. | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Drivers/DRI/i965 | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | medium | CC: | gordon.jin |
Version: | git | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Vinson Lee
2009-10-06 12:50:16 UTC
Partially fixed with: commit cb132406ded760a622513cd1ab86bf83bb945671 Author: Eric Anholt <eric@anholt.net> Date: Fri Oct 30 13:28:44 2009 -0700 i965: Add an index assert on get_fp_inst array like other compiler arrays. But the program fails on swrast as well, once it's made to use PROGRAM_INSTRUCTIONS instead of NATIVE_PROGRAM_INSTRUCTIONS if NATIVE == 0. I think Mesa should set NATIVE_FOO to FOO for swrast -- any objections? The swrast problem boils down to a new assert I threw into the program parser: Testing: alu_depth = 1541 fp-long-alu: program_parse.y:2479: initialize_symbol_from_const: Assertion `idx < (1 << 10)' failed. This whole 10-bits-of-index thing seems to be a continuous source of errors. Can we just make it 32 bits already? OK, so all those literals like { 0.062500, 0.000000, 0.000000, 0.000000 } are getting saved with _mesa_add_parameter() until we have 1024 of them at which point we overflow the prog_src_register::Index field which is limited to [-1024,1023]. I think the solution to this particular problem is to use _mesa_add_unnamed_constant() in initialize_symbol_from_const(). That function looks for swizzled variations of vector constants and returns a swizzle mask. But that would require adding a swizzle field to struct asm_symbol (and some code to handle it elsewhere). Also, we should then check if the index returned by _mesa_add_unnamed_constant() exceeds state->limits->MaxParameters. Ian? In the mean time, I've got a patch that does additional checking of src/dst fields. (In reply to comment #1) > Partially fixed with: > > commit cb132406ded760a622513cd1ab86bf83bb945671 > Author: Eric Anholt <eric@anholt.net> > Date: Fri Oct 30 13:28:44 2009 -0700 > > i965: Add an index assert on get_fp_inst array like other compiler arrays. > > But the program fails on swrast as well, once it's made to use > PROGRAM_INSTRUCTIONS instead of NATIVE_PROGRAM_INSTRUCTIONS if NATIVE == 0. I > think Mesa should set NATIVE_FOO to FOO for swrast -- any objections? Can you suggest a patch? I don't have time to investigate this right now. *** Bug 27302 has been marked as a duplicate of this bug. *** commit 97615b2d8c7c3cea6fd3a43bcb1739a96e2046c4 Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 27 14:35:01 2012 -0700 i965: Replace brw_wm_* with dumping code into the fs_visitor. |
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.