OSDN Git Service

llvmpipe: support GL_ARB_texture_buffer_object/GL_ARB_texture_buffer_range
authorRoland Scheidegger <sroland@vmware.com>
Mon, 25 Feb 2013 19:23:18 +0000 (20:23 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Mon, 25 Feb 2013 19:38:23 +0000 (20:38 +0100)
commit20183177a5803317fe69f1f1a8dfae4d18b3702f
treee77794acca4b68049088722cc32d4fab2da0c6e4
parent50a5d5dea0c21886bc3445c0ad0928b03e64ab10
llvmpipe: support GL_ARB_texture_buffer_object/GL_ARB_texture_buffer_range

This also fixes not honoring first/last_layer view parameters for array
textures, plus not honoring last_level view parameter for all textures
(neither is really used by OpenGL).
This mostly passes piglit arb_texture_buffer_object tests (it needs, however,
glsl 140 version override, plus GL 3.1 override, the latter only because
mesa does not allow ARB_tbo in non-core contexts).
Most arb_texture_buffer_object tests pass, with the exception of
arb_texture_buffer_object-formats. With "arb" parameter it passes most weirdo
formats before it segfaults in the state tracker, this looks to be some issue
with using legacy formats in core context (fails the same in softpipe).
With "core" parameter it passes with "fs", however fails with "vs" (for most
formats). This will be fixed later (debugging shows we're completely missing
the shader recompile depending on format).

v2: based on Jose's feedback, fix comments, variable/function names.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 files changed:
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/draw/draw_context.h
src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/auxiliary/draw/draw_llvm.h
src/gallium/auxiliary/gallivm/lp_bld_sample.h
src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
src/gallium/drivers/llvmpipe/lp_jit.h
src/gallium/drivers/llvmpipe/lp_screen.c
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_state_sampler.c
src/gallium/drivers/llvmpipe/lp_texture.c
src/gallium/drivers/llvmpipe/lp_texture.h