Bug 49049 - RendererFeatTest32 crashes with gm45 (uniform storage)
Summary: RendererFeatTest32 crashes with gm45 (uniform storage)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-22 01:40 UTC by Roman Elshin
Modified: 2014-09-06 10:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
message at console after crash (16.76 KB, text/plain)
2012-04-22 01:40 UTC, Roman Elshin
Details

Description Roman Elshin 2012-04-22 01:40:45 UTC
Created attachment 60443 [details]
message at console after crash

mesa current git (OpenGL version string: 2.1 Mesa 8.1-devel (git-e6aad9b)), compile options:
./autogen.sh --prefix=/usr \
--disable-static --enable-shared \
--enable-texture-float \
--with-gallium-drivers="" \
--disable-egl \
--disable-glu \
--disable-gles2 \
--with-driver=dri \
--with-dri-driverdir=/usr/lib/dri \
--with-dri-drivers=i965

Xserver-1.9.5
libdrm - currnet git
xf86-video-intel - current git (uxa)
kernel-3.0.28

RendererFeatTest crashes after test 5 with such message.
Comment 1 Eric Anholt 2012-08-08 21:02:55 UTC
valgrind complaint:

==10912== Invalid write of size 4
==10912==    at 0x48D5E8A: memcpy (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==10912==    by 0xA7920FD: _mesa_propagate_uniforms_to_driver_storage (uniform_query.cpp:505)
==10912==    by 0xA79241E: _mesa_uniform (uniform_query.cpp:762)
==10912==    by 0xA6A509A: _mesa_Uniform1fARB (uniforms.c:134)
==10912==    by 0x82D2FEB: hpl::cGLSLProgram::SetFloat(int, float) (in /home/anholt/games/RendererFeatTest32/RendererFeatTest.bin)
==10912==    by 0x81281DB: hpl::cRendererDeferred::SetupProgramAndTextures(hpl::cDeferredLight*, unsigned int) (in /home/anholt/games/RendererFeatTest32/RendererFeatTest.bin)
==10912==    by 0x812AA70: hpl::cRendererDeferred::RenderLights_RenderBack() (in /home/anholt/games/RendererFeatTest32/RendererFeatTest.bin)
==10912==    by 0x812C5F7: hpl::cRendererDeferred::RenderLights() (in /home/anholt/games/RendererFeatTest32/RendererFeatTest.bin)
==10912==    by 0x812EE40: hpl::cRendererDeferred::RenderObjects() (in /home/anholt/games/RendererFeatTest32/RendererFeatTest.bin)
==10912==    by 0x814DC9B: hpl::iRenderer::Render(float, hpl::cFrustum*, hpl::cWorld*, hpl::cRenderSettings*, hpl::cRenderTarget*, bool, std::list<hpl::iRendererCallback*, std::allocator<hpl::iRendererCallback*> >*) (in /home/anholt/games/RendererFeatTest32/RendererFeatTest.bin)
==10912==    by 0x816A2BE: hpl::cScene::Render(float, unsigned int) (in /home/anholt/games/RendererFeatTest32/RendererFeatTest.bin)
==10912==    by 0x822AD46: hpl::cEngine::Run() (in /home/anholt/games/RendererFeatTest32/RendererFeatTest.bin)
==10912==  Address 0xfcc1410 is 64 bytes inside a block of size 128 free'd
==10912==    at 0x48D350C: free (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==10912==    by 0xA64130C: _mesa_align_free (imports.c:179)
==10912==    by 0xA641368: _mesa_align_realloc (imports.c:206)
==10912==    by 0xA71F90B: _mesa_add_parameter (prog_parameter.c:132)
==10912==    by 0xA71FB7B: _mesa_add_state_reference (prog_parameter.c:412)
==10912==    by 0xA51FDF3: fs_visitor::emit_texcoord(ir_texture*, int) (brw_fs_visitor.cpp:1212)
==10912==    by 0xA520B01: fs_visitor::visit(ir_texture*) (brw_fs_visitor.cpp:1298)
==10912==    by 0xA7B8B67: ir_texture::accept(ir_visitor*) (ir.h:1375)
==10912==    by 0xA5251F6: fs_visitor::visit(ir_assignment*) (brw_fs_visitor.cpp:717)
==10912==    by 0xA7B8A37: ir_assignment::accept(ir_visitor*) (ir.h:827)
==10912==    by 0xA51C153: fs_visitor::visit(ir_function*) (brw_fs_visitor.cpp:1816)
==10912==    by 0xA7B89B7: ir_function::accept(ir_visitor*) (ir.h:653)
Comment 2 Eric Anholt 2013-02-16 07:06:45 UTC
This should be fixed by the series ending with:

commit 12751ef2a70f2e8ce06b116d69e475dfa5dc6f38
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Nov 21 14:33:52 2012 -0800

    i965: Stop making a copy of non-builtin uniforms in ParameterValues[].
    
    We don't need them now that our set of parameter pointers points at the
    GL core storage for them.  This should save memory/bandwidth/overhead in
    uniform updates.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

(and particularly commit ffdfafb06cf3ae468ceb3e504365016347f54bee)
Comment 3 Roman Elshin 2013-02-22 14:37:55 UTC
commit 12751ef2a70f2e8ce06b116d69e475dfa5dc6f38
and
commit ffdfafb06cf3ae468ceb3e504365016347f54bee
applied atop 9.0.3 make RendererFeatTest32 hangs immediately after start, but commit ffdfafb06cf3ae468ceb3e504365016347f54bee alone seems to fix this issue,
(https://bugs.freedesktop.org/show_bug.cgi?id=47169)
now it hangs or crashes at test 11.
Comment 4 Roman Elshin 2013-03-08 20:52:14 UTC
RendererFeatTest32 began to work after applying(mesa-9.0.3) these patches:

i965/fs: Refactor rectangle/GL_CLAMP texture coordinate adjustment
i965/fs: Pull ir_binop_min/ir_binop_max handling to a separate function
i965/fs: Pass fragment depth to the fb write as a fs_reg, not an ir_variable
i965: Replace brw_wm_* with dumping code into the fs_visitor
i965/fp: Fix segfault on gen4 TXB instructions
i965/gen4: Fix crash with fragment programs and texture rectangle
i965: Add texrect scale parameters before pointers to ParameterValues
i965/fs: Remove the param_index/param_offset indirection
i965/fs: Reference the core GL uniform storage for non-builtin uniforms
i965/vs: Reference the core GL uniform storage for non-builtin uniforms
i965: Consistently use nr_pull_params instead of NumParameters
i965: Stop making a copy of non-builtin uniforms in ParameterValues[]
Comment 5 Roman Elshin 2013-03-10 14:53:53 UTC
manually revert this commit from master makes RendererFeatTest32 working:
f144b78dfbb97a70121be6f20d10bad8111267e3
i965: Make the param pointer arrays for the WM dynamically sized.
Comment 6 Matt Turner 2014-08-11 03:36:36 UTC
Still reproducible? (I'd try, but I don't know what RendererFeatTest32 is or where to get it)
Comment 7 Roman Elshin 2014-09-06 10:45:43 UTC
RendererFeatTest32 - Graphics compatibility test for amnesia dark descent game. It does not crash any more, but incorrect in "test 10:SSAO", it was working with patched mesa-9.0.3. Is it possible that the reason is a mixed graphics stack (mesa and libdrm from current git with 3.7.10 kernel, sna from year ago and 1.13 xserver)? in any case it is another issue.


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.