[Mesa-dev] [RFC] [PATCH 0/4] New coordinate normalization patches with bind flags
Luca Barbieri
luca at luca-barbieri.com
Tue Aug 17 00:09:09 PDT 2010
This is a new approach to the coordinate normalization issue.
I only compile tested this, and posted it to find out if I'm on the right
track, and will do more testing if so.
On the state tracker -> driver front, I no longer have any resource flags and
instead split PIPE_BIND_SAMPLER_VIEW into 4 separate flags.
Those are:
PIPE_BIND_SAMPLER_VIEW_ANY: asks for a normalization of the driver's choice
PIPE_BIND_SAMPLER_VIEW_NORMALIZED: asks for normalized, any wrap mode
PIPE_BIND_SAMPLER_VIEW_UNNORMALIZED_CLAMP: asks for unnormalized, clamp mode
PIPE_BIND_SAMPLER_VIEW_UNNORMALIZED_NON_CLAMP: asks for unnormalized, non-clamp
And PIPE_BIND_SAMPLER_VIEW_ALL which is an OR of them all.
All of these imply PIPE_BIND_SAMPLER_VIEW_ANY.
I think this is the conceptually cleanest approach, even though it requires
to modify all instances of PIPE_BIND_SAMPLER_VIEW (hence the long diffstat).
On the driver -> state tracker front, I split the flag into two flags.
This allows the driver to either express no preference, or express any of the
two preferences.
I haven't (yet?) replaced them with a query, since Keith hasn't elaborated
on his idea yet, and I don't like all the ways of adding a query I can think
of myself very much (less CPU-efficient, more driver code, no apparent gain).
What do you think? Is this the right thing?
Luca Barbieri (4):
gallium: add resource normalization flags (v3)
gallium: only use PIPE_BIND_SAMPLER_VIEW_* flags actually needed
gallium: use unnormalized coords internally if the driver asks for
them (v5)
st/mesa: use PIPE_BIND_SAMPLER_VIEW_UNNORMALIZED_CLAMP for
GL_TEXTURE_RECTANGLE (v2)
src/gallium/auxiliary/draw/draw_pipe_aaline.c | 2 +-
src/gallium/auxiliary/draw/draw_pipe_pstipple.c | 2 +-
src/gallium/auxiliary/util/u_blit.c | 59 +++++++++++----
src/gallium/auxiliary/util/u_blitter.c | 50 ++++++++-----
src/gallium/auxiliary/util/u_caps.c | 2 +-
src/gallium/auxiliary/util/u_debug.c | 3 +-
src/gallium/drivers/nouveau/nouveau_screen.c | 2 +-
src/gallium/drivers/nv50/nv50_screen.c | 2 +-
src/gallium/drivers/nvfx/nvfx_miptree.c | 2 +-
src/gallium/drivers/nvfx/nvfx_screen.c | 2 +-
src/gallium/drivers/r300/r300_blit.c | 2 +-
src/gallium/drivers/r300/r300_context.c | 2 +-
src/gallium/drivers/r300/r300_screen.c | 4 +-
src/gallium/drivers/r300/r300_transfer.c | 4 +-
src/gallium/drivers/r600/r600_buffer.c | 2 +-
src/gallium/drivers/r600/r600_screen.c | 4 +-
src/gallium/drivers/svga/svga_pipe_blit.c | 2 +-
src/gallium/drivers/svga/svga_resource_texture.c | 2 +-
src/gallium/drivers/svga/svga_screen.c | 2 +-
src/gallium/include/pipe/p_defines.h | 77 ++++++++++++++++++--
.../state_trackers/dri/common/dri_drawable.c | 2 +-
src/gallium/state_trackers/dri/drm/dri2.c | 2 +-
src/gallium/state_trackers/egl/gdi/native_gdi.c | 2 +-
src/gallium/state_trackers/egl/kms/native_kms.c | 2 +-
src/gallium/state_trackers/egl/x11/native_ximage.c | 2 +-
src/gallium/state_trackers/python/st_device.c | 2 +-
src/gallium/state_trackers/vega/api_filters.c | 2 +-
src/gallium/state_trackers/vega/image.c | 4 +-
src/gallium/state_trackers/vega/mask.c | 2 +-
src/gallium/state_trackers/vega/paint.c | 2 +-
src/gallium/state_trackers/vega/renderer.c | 6 +-
src/gallium/state_trackers/vega/vg_manager.c | 2 +-
src/gallium/state_trackers/xorg/xorg_exa.c | 6 +-
src/gallium/state_trackers/xorg/xorg_renderer.c | 4 +-
src/gallium/state_trackers/xorg/xorg_xv.c | 2 +-
src/gallium/tests/graw/fs-test.c | 2 +-
src/gallium/tests/graw/gs-test.c | 2 +-
src/gallium/tests/graw/quad-tex.c | 2 +-
src/gallium/tests/graw/vs-test.c | 2 +-
src/gallium/tests/python/tests/surface_copy.py | 5 +-
src/gallium/tests/python/tests/texture_blit.py | 6 +-
src/gallium/tests/python/tests/texture_render.py | 4 +-
src/gallium/tests/python/tests/texture_transfer.py | 2 +-
src/gallium/winsys/radeon/drm/radeon_r300.c | 2 +-
src/mesa/state_tracker/st_atom_pixeltransfer.c | 4 +-
src/mesa/state_tracker/st_cb_bitmap.c | 31 +++++---
src/mesa/state_tracker/st_cb_drawpixels.c | 38 ++--------
src/mesa/state_tracker/st_cb_eglimage.c | 2 +-
src/mesa/state_tracker/st_cb_texture.c | 26 ++++---
src/mesa/state_tracker/st_context.h | 2 +-
src/mesa/state_tracker/st_extensions.c | 14 ++--
src/mesa/state_tracker/st_format.c | 21 ++++--
src/mesa/state_tracker/st_texture.c | 2 +-
53 files changed, 266 insertions(+), 170 deletions(-)
More information about the mesa-dev
mailing list