https://bugs.freedesktop.org/show_bug.cgi?id=70110
Priority: medium Bug ID: 70110 Assignee: dri-devel@lists.freedesktop.org Summary: [bisected] regression: assert in r600_bind_sampler_states since 27c054edf0ae92c8c498830e7c7510fa94f5dcfd Severity: normal Classification: Unclassified OS: All Reporter: alexandre.f.demers@gmail.com Hardware: Other Status: NEW Version: git Component: Drivers/Gallium/r600 Product: Mesa
~/projects/display/openGL/tests/tropics_32$ ~/projects/display/test-gallium-32.sh ./1024x768_windowed.sh Launching ./1024x768_windowed.sh r600_state_common.c:399:r600_bind_sampler_states: Assertion `!"Only vertex/fragment sampler are implemented."' failed. ./1024x768_windowed.sh: line 13: 24122 Trace/breakpoint trap (core dumped) ./bin/Tropics -video_app opengl -sound_app openal -extern_define RELEASE -system_script tropics/unigine.cpp -engine_config ../data/unigine.cfg -data_path ../ -video_fullscreen 0 -video_mode -1 -video_width 1024 -video_height 768
On HD 6950 First bad commit: 27c054edf0ae92c8c498830e7c7510fa94f5dcfd
radeon: don't use old bind_vertex/fragment_sampler_states() hooks Author Brian Paulbrianp@vmware.com Author date 9/12/13 5:45 PM Parent i915g: remove old bind_vertex/fragment_sampler_states() h... Child svga: don't hook in old bind_fragment_sampler_states() fu... Branch origin/master (radeonsi/compute: Fix segfault caused by recent refactoring) Follows snb-magic (graw: Add struct pipe_surface forward declaration.)
radeon: don't use old bind_vertex/fragment_sampler_states() hooks
https://bugs.freedesktop.org/show_bug.cgi?id=70110
--- Comment #1 from Alexandre Demers alexandre.f.demers@gmail.com --- Easy one: under r600_bind_sampler_states(), there is an assert. Since I'm building with --enable-debug, I hit it.
if (shader != PIPE_SHADER_VERTEX && shader != PIPE_SHADER_FRAGMENT) { assert(!"Only vertex/fragment sampler are implemented."); return; }
I suggest we should/could print out an error message if needed, but it shouldn't be an assert() since we return just after that without doing anything if the shader is not of the supported type. In fact, I tested mesa with the assert commented out and everything was back to the way it used to be, so we really don't need an assert() there. A R600_ERR() seems to do the trick here:
if (shader != PIPE_SHADER_VERTEX && shader != PIPE_SHADER_FRAGMENT) { R600_ERR("!Only vertex/fragment sampler are implemented.\n"); return; }
https://bugs.freedesktop.org/show_bug.cgi?id=70110
--- Comment #2 from Alexandre Demers alexandre.f.demers@gmail.com --- Created attachment 87133 --> https://bugs.freedesktop.org/attachment.cgi?id=87133&action=edit Replace overkill assert by
It fixes an unneeded assert preventing some app to launch as they should. Please review and commit.
https://bugs.freedesktop.org/show_bug.cgi?id=70110
Marek Olšák maraeo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #3 from Marek Olšák maraeo@gmail.com --- Fixed by c04b8d1daba5468a7ea991a65570a41951e2da7d. Closing.
dri-devel@lists.freedesktop.org