gallium/auxiliary/util: prevent debug_dump_surface_bmp from recursion
What does this MR do and why?
gallium/auxiliary/util: prevent debug_dump_surface_bmp from recursion
The infinite recursion looks like this:
llvmpipe_flush() ->
debug_dump_surface_bmp() ->
pipe_texture_map() ->
llvmpipe_transfer_map() ->
llvmpipe_transfer_map_ms() ->
llvmpipe_flush_resource() ->
llvmpipe_finish() ->
llvmpipe_flush() -> *
If `debug_dump_surface_bmp()` is called from xxx_flush() (xxx maybe llvmpipe,
softpipe or svga), it will end up depleting the stack space. Even though
such use cases for `debug_dump_surface_bmp()` are *conditionally* compiled
at the moment, but who knows someone would count on it someday?
Signed-off-by: Luc Ma <luc@sietium.com>