Commit Graph

284 Commits

Author SHA1 Message Date
José Fonseca 6586a3b287 tests: Use elts in translate_test. 2011-04-01 20:18:22 +01:00
José Fonseca 3f68d4b058 scons: Add aliases for unit tests. 2011-04-01 20:18:22 +01:00
Marek Olšák 7e02303497 gallium: remove flags from the flush function
The drivers have been changed so that they behave as if all of the flags
were set. This is already implicit in most hardware drivers and required
for multiple contexts.

Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag
to decide whether flush_frontbuffer should be called.
New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
2011-03-11 21:39:31 +01:00
Vinson Lee c0d3fb4b6c scons: Fix immediate Python exceptions with SCons on SunOS.
The build still fails.
2011-03-08 17:59:57 -08:00
Marek Olšák eafb7f234d gallium: add usage parameter to pipe_buffer_create
And set a reasonable buffer usage flag everywhere instead of
just PIPE_USAGE_DEFAULT.
2011-02-15 22:44:21 +01:00
Vinson Lee 7582448016 graw: remove pipe_vertex_buffer::max_index
This is a follow-up to commit cdca3c58aa.
2011-02-14 13:53:09 -08:00
Marek Olšák cdca3c58aa gallium: remove pipe_vertex_buffer::max_index
This is redundant to pipe_draw_info::max_index and doesn't really fit
in the optimizations I plan.
2011-02-14 21:50:08 +01:00
Zack Rusin 3d9138781d graw: add a test showing the new sampling scheme in action 2011-01-24 17:53:29 -05:00
Zack Rusin bdbe77f9c6 gallium: implement modern sampling scheme
largely a merge of the previously discussed origin/gallium-resource-sampling
but updated.
the idea is to allow arbitrary binding of resources, the way opencl, new gl
versions and dx10+ require, i.e.
    DCL RES[0], 2D, FLOAT

    LOAD DST[0], SRC[0], RES[0]
    SAMPLE DST[0], SRC[0], RES[0], SAMP[0]
2011-01-24 17:47:10 -05:00
Brian Paul 4ef955a12a graw: fix logic error in pixel format selection
The loop to choose a pixel format for the window was incrementing
'i' after we succeeded in creating the window so if we chose format[0]
for graw_create_window_and_screen() we were putting format[1] in
the pipe_resource template for creating the render target.

This only worked because of the order of the elements in the formats[]
array.

The graw_xlib.c code now properly compares the requested gallium pixel
format against the visual's color layout.

Update all the graw demos to fix the off-by-one-i error.
2011-01-20 13:37:26 -07:00
José Fonseca 27ba2eb33b retrace: Some fixes. 2010-12-02 12:17:07 +00:00
Roland Scheidegger 4c70014626 gallium: support for array textures and related changes
resources have a array_size parameter now.
get_tex_surface and tex_surface_destroy have been renamed to create_surface
and surface_destroy and moved to context, similar to sampler views (and
create_surface now uses a template just like create_sampler_view). Surfaces
now really should only be used for rendering. In particular they shouldn't be
used as some kind of 2d abstraction for sharing a texture. offset/layout fields
don't make sense any longer and have been removed, width/height should go too.
surfaces and sampler views now specify a layer range (for texture resources),
layer is either array slice, depth slice or cube face.
pipe_subresource is gone array slices (or cube faces) are now treated the same
as depth slices in transfers etc. (that is, they use the z coord of the
respective functions).

Squashed commit of the following:

commit a45bd509014743d21a532194d7b658a1aeb00cb7
Merge: 1aeca28 32e1e59
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Dec 2 04:32:06 2010 +0100

    Merge remote branch 'origin/master' into gallium-array-textures

    Conflicts:
    	src/gallium/drivers/i915/i915_resource_texture.c
    	src/gallium/drivers/i915/i915_state_emit.c
    	src/gallium/drivers/i915/i915_surface.c

commit 1aeca287a827f29206078fa1204715a477072c08
Merge: 912f042 6f7c8c3
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Dec 2 00:37:11 2010 +0100

    Merge remote branch 'origin/master' into gallium-array-textures

    Conflicts:
    	src/gallium/state_trackers/vega/api_filters.c
    	src/gallium/state_trackers/vega/api_images.c
    	src/gallium/state_trackers/vega/mask.c
    	src/gallium/state_trackers/vega/paint.c
    	src/gallium/state_trackers/vega/renderer.c
    	src/gallium/state_trackers/vega/st_inlines.h
    	src/gallium/state_trackers/vega/vg_context.c
    	src/gallium/state_trackers/vega/vg_manager.c

commit 912f042e1d439de17b36be9a740358c876fcd144
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Wed Dec 1 03:01:55 2010 +0100

    gallium: even more compile fixes after merge

commit 6fc95a58866d2a291def333608ba9c10c3f07e82
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Wed Dec 1 00:22:26 2010 +0100

    gallium: some fixes after merge

commit a8d5ffaeb5397ffaa12fb422e4e7efdf0494c3e2
Merge: f7a202f 2da02e7
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Tue Nov 30 23:41:26 2010 +0100

    Merge remote branch 'origin/master' into gallium-array-textures

    Conflicts:
    	src/gallium/drivers/i915/i915_state_emit.c
    	src/gallium/state_trackers/vega/api_images.c
    	src/gallium/state_trackers/vega/vg_context.c

commit f7a202fde2aea2ec78ef58830f945a5e214e56ab
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Wed Nov 24 19:19:32 2010 +0100

    gallium: even more fixes/cleanups after merge

commit 6895a7f969ed7f9fa8ceb788810df8dbcf04c4c9
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Wed Nov 24 03:07:36 2010 +0100

    gallium: more compile fixes after merge

commit af0501a5103b9756bc4d79167bd81051ad6e8670
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Tue Nov 23 19:24:45 2010 +0100

    gallium: lots of compile fixes after merge

commit 0332003c2feb60f2a20e9a40368180c4ecd33e6b
Merge: 26c6346 b6b91fa
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Tue Nov 23 17:02:26 2010 +0100

    Merge remote branch 'origin/master' into gallium-array-textures

    Conflicts:
    	src/gallium/auxiliary/gallivm/lp_bld_sample.c
    	src/gallium/auxiliary/util/u_blit.c
    	src/gallium/auxiliary/util/u_blitter.c
    	src/gallium/auxiliary/util/u_inlines.h
    	src/gallium/auxiliary/util/u_surface.c
    	src/gallium/auxiliary/util/u_surfaces.c
    	src/gallium/docs/source/context.rst
    	src/gallium/drivers/llvmpipe/lp_rast.c
    	src/gallium/drivers/nv50/nv50_state_validate.c
    	src/gallium/drivers/nvfx/nv04_surface_2d.c
    	src/gallium/drivers/nvfx/nv04_surface_2d.h
    	src/gallium/drivers/nvfx/nvfx_buffer.c
    	src/gallium/drivers/nvfx/nvfx_miptree.c
    	src/gallium/drivers/nvfx/nvfx_resource.c
    	src/gallium/drivers/nvfx/nvfx_resource.h
    	src/gallium/drivers/nvfx/nvfx_state_fb.c
    	src/gallium/drivers/nvfx/nvfx_surface.c
    	src/gallium/drivers/nvfx/nvfx_transfer.c
    	src/gallium/drivers/r300/r300_state_derived.c
    	src/gallium/drivers/r300/r300_texture.c
    	src/gallium/drivers/r600/r600_blit.c
    	src/gallium/drivers/r600/r600_buffer.c
    	src/gallium/drivers/r600/r600_context.h
    	src/gallium/drivers/r600/r600_screen.c
    	src/gallium/drivers/r600/r600_screen.h
    	src/gallium/drivers/r600/r600_state.c
    	src/gallium/drivers/r600/r600_texture.c
    	src/gallium/include/pipe/p_defines.h
    	src/gallium/state_trackers/egl/common/egl_g3d_api.c
    	src/gallium/state_trackers/glx/xlib/xm_st.c
    	src/gallium/targets/libgl-gdi/gdi_softpipe_winsys.c
    	src/gallium/targets/libgl-gdi/libgl_gdi.c
    	src/gallium/tests/graw/tri.c
    	src/mesa/state_tracker/st_cb_blit.c
    	src/mesa/state_tracker/st_cb_readpixels.c

commit 26c6346b385929fba94775f33838d0cceaaf1127
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Mon Aug 2 19:37:21 2010 +0200

    fix more merge breakage

commit b30d87c6025eefe7f6979ffa8e369bbe755d5c1d
Merge: 9461bf3 1f1928d
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Mon Aug 2 19:15:38 2010 +0200

    Merge remote branch 'origin/master' into gallium-array-textures

    Conflicts:
    	src/gallium/drivers/llvmpipe/lp_rast.c
    	src/gallium/drivers/llvmpipe/lp_rast_priv.h
    	src/gallium/drivers/r300/r300_blit.c
    	src/gallium/drivers/r300/r300_screen_buffer.c
    	src/gallium/drivers/r300/r300_state_derived.c
    	src/gallium/drivers/r300/r300_texture.c
    	src/gallium/drivers/r300/r300_texture.h
    	src/gallium/drivers/r300/r300_transfer.c
    	src/gallium/drivers/r600/r600_screen.c
    	src/gallium/drivers/r600/r600_state.c
    	src/gallium/drivers/r600/r600_texture.c
    	src/gallium/drivers/r600/r600_texture.h
    	src/gallium/state_trackers/dri/common/dri1_helper.c
    	src/gallium/state_trackers/dri/sw/drisw.c
    	src/gallium/state_trackers/xorg/xorg_exa.c

commit 9461bf3cfb647d2301364ae29fc3084fff52862a
Merge: 17492d7 0eaccb3
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Jul 15 20:13:45 2010 +0200

    Merge commit 'origin/master' into gallium-array-textures

    Conflicts:
    	src/gallium/auxiliary/util/u_blitter.c
    	src/gallium/drivers/llvmpipe/lp_rast.c
    	src/gallium/drivers/llvmpipe/lp_surface.c
    	src/gallium/drivers/r300/r300_render.c
    	src/gallium/drivers/r300/r300_state.c
    	src/gallium/drivers/r300/r300_texture.c
    	src/gallium/drivers/r300/r300_transfer.c
    	src/gallium/tests/trivial/quad-tex.c

commit 17492d705e7b7f607b71db045c3bf344cb6842b3
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Fri Jun 18 10:58:08 2010 +0100

    gallium: rename element_offset/width fields in views to first/last_element

    This is much more consistent with the other fields used there
    (first/last level, first/last layer).
    Actually thinking about removing the ugly union/structs again and
    rename first/last_layer to something even more generic which could also
    be used for buffers (like first/last_member) without inducing headaches.

commit 1b717a289299f942de834dcccafbab91361e20ab
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Jun 17 14:46:09 2010 +0100

    gallium: remove PIPE_SURFACE_LAYOUT_LINEAR definition

    This was only used by the layout field of pipe_surface, but this
    driver internal stuff is gone so there's no need for this driver independent
    layout definition neither.

commit 10cb644b31b3ef47e6c7b55e514ad24bb891fac4
Merge: 5691db9 c85971d
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Jun 17 12:20:41 2010 +0100

    Merge commit 'origin/master' into gallium-array-textures

    Conflicts:
    	src/gallium/docs/source/glossary.rst
    	src/gallium/tests/graw/fs-test.c
    	src/gallium/tests/graw/gs-test.c

commit 5691db960ca3d525ce7d6c32d9c7a28f5e907f3b
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Jun 17 11:29:03 2010 +0100

    st/wgl: fix interface changes bugs

commit 2303ec32143d363b46e59e4b7c91b0ebd34a16b2
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Wed Jun 16 19:42:32 2010 +0100

    gallium: adapt code to interface changes...

commit dcae4f586f0d0885b72674a355e5d56d47afe77d
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Wed Jun 16 19:42:05 2010 +0100

    gallium: separate depth0 and array_size in the resource itself.

    These fields are still mutually exclusive (since no 3d array textures exist)
    but it ultimately seemed to error-prone to adapt all code accept the new
    meaning of depth0 (drivers stick that into hardware regs, calculate mipmap
    sizes etc.). And it isn't really cleaner anyway.
    So, array textures will have depth0 of 1, but instead use array_size,
    3D textures will continue to use depth0 (and have array_size of 1). Cube
    maps also will use array_size to indicate their 6 faces, but since all drivers
    should just be fine by inferring this themselves from the fact it's a cube map
    as they always used to nothing should break.

commit 621737a638d187d208712250fc19a91978fdea6b
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Wed Jun 16 17:47:38 2010 +0100

    gallium: adapt code to interface changes

    There are still usages of pipe_surface where pipe_resource should be used,
    which should eventually be fixed.

commit 2d17f5efe166b2c3d51957c76294165ab30b8ae2
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Wed Jun 16 17:46:14 2010 +0100

    gallium: more interface changes

    In particular to enable usage of buffers in views, and ability to use a
    different pipe_format in pipe_surface.
    Get rid of layout and offset parameter in pipe_surface - the former was
    not used in any (public) code anyway, and the latter should either be computed
    on-demand or driver can use subclass of pipe_surface.
    Also make create_surface() use a template to be more consistent with
    other functions.

commit 71f885ee16aa5cf2742c44bfaf0dc5b8734b9901
Merge: 3232d11 8ad410d
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Mon Jun 14 14:19:51 2010 +0100

    Merge commit 'origin/master' into gallium-array-textures

    Conflicts:
    	src/gallium/auxiliary/util/u_box.h
    	src/gallium/drivers/nv50/nv50_surface.c
    	src/gallium/drivers/nvfx/nvfx_surface.c
    	src/gallium/drivers/r300/r300_blit.c
    	src/gallium/drivers/r300/r300_texture.c
    	src/gallium/drivers/r300/r300_transfer.c
    	src/gallium/drivers/r600/r600_blit.c
    	src/gallium/drivers/r600/r600_screen.h
    	src/gallium/include/pipe/p_state.h

commit 3232d11fe3ebf7686286013c357b404714853984
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Mon Jun 14 11:40:04 2010 +0100

    mesa/st: adapt to interface changes

    still need to fix pipe_surface sharing
    (as that is now per-context).
    Also broken is depth0 handling - half the code assumes
    this is also used for array textures (and hence by extension
    of that cube maps would have depth 6), half the code does not...

commit f433b7f7f552720e5eade0b4078db94590ee85e1
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Mon Jun 14 11:35:52 2010 +0100

    gallium: fix a couple of bugs in interface chnage fixes

commit 818366b28ea18f514dc791646248ce6f08d9bbcf
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:42:11 2010 +0200

    targets: adapt to interface changes

    Yes even that needs adjustments...

commit 66c511ab1682c9918e0200902039247793acb41e
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:41:13 2010 +0200

    tests: adapt to interface changes

    Everything needs to be fixed :-(.

commit 6b494635d9dbdaa7605bc87b1ebf682b138c5808
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:39:50 2010 +0200

    st: adapt non-rendering state trackers to interface changes

    might not be quite right in all places, but they really don't want
    to use pipe_surface.

commit 00c4289a35d86e4fe85919ec32aa9f5ffe69d16d
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:38:48 2010 +0200

    winsys: adapt to interface changes

commit 39d858554dc9ed5dbc795626fec3ef9deae552a0
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:26:54 2010 +0200

    st/python: adapt to interface changes

    don't think that will work, sorry.

commit 6e9336bc49b32139cec4e683857d0958000e15e3
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:26:07 2010 +0200

    st/vega: adapt to interface changes

commit e07f2ae9aaf8842757d5d50865f76f8276245e11
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:25:56 2010 +0200

    st/xorg: adapt to interface changes

commit 05531c10a74a4358103e30d3b38a5eceb25c947f
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:24:53 2010 +0200

    nv50: adapt to interface changes

commit 97704f388d7042121c6d496ba8c003afa3ea2bf3
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:24:45 2010 +0200

    nvfx: adapt to interface changes

commit a8a9c93d703af6e8f5c12e1cea9ec665add1abe0
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:24:01 2010 +0200

    i965g: adapt to interface changes

commit 0dde209589872d20cc34ed0b237e3ed7ae0e2de3
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:22:38 2010 +0200

    i915g: adapt to interface changes

commit 5cac9beede69d12f5807ee1a247a4c864652799e
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:20:58 2010 +0200

    svga: adapt to interface changes

    resource_copy_region still looking fishy.
    Was not very suited to unified zslice/face approach...

commit 08b5a6af4b963a3e4c75fc336bf6c0772dce5150
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:20:01 2010 +0200

    rbug: adapt to interface changes

    Not sure if that won't need changes elsewhere?

commit c9fd24b1f586bcef2e0a6e76b68e40fca3408964
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:19:31 2010 +0200

    trace: adapt to interface changes

commit ed84e010afc5635a1a47390b32247a266f65b8d1
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:19:21 2010 +0200

    failover: adapt to interface changes

commit a1d4b4a293da933276908e3393435ec4b43cf201
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:19:12 2010 +0200

    identity: adapt to interface changes

commit a8dd73e2c56c7d95ffcf174408f38f4f35fd2f4c
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:18:55 2010 +0200

    softpipe: adapt to interface changes

commit a886085893e461e8473978e8206ec2312b7077ff
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:18:44 2010 +0200

    llvmpipe: adapt to interface changes

commit 70523f6d567d8b7cfda682157556370fd3c43460
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:18:14 2010 +0200

    r600g: adapt to interface changes

commit 3f4bc72bd80994865eb9f6b8dfd11e2b97060d19
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:18:05 2010 +0200

    r300g: adapt to interface changes

commit 5d353b55ee14db0ac0515b5a3cf9389430832c19
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:17:37 2010 +0200

    cell: adapt to interface changes

    not even compile tested

commit cf5d03601322c2dcb12d7a9c2f1745e2b2a35eb4
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:14:59 2010 +0200

    util: adapt to interface changes

    amazing how much code changes just due to some subtle interface changes?

commit dc98d713c6937c0e177fc2caf23020402cc7ea7b
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Sat Jun 12 02:12:40 2010 +0200

    gallium: more interface fail, docs

    this also changes flush_frontbuffer to use a pipe_resource instead of
    a pipe_surface - pipe_surface is not meant to be (or at least no longer)
    an abstraction for standalone 2d images which get passed around.
    (This has also implications for the non-rendering state-trackers.)

commit 08436d27ddd59857c22827c609b692aa0c407b7b
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Jun 10 17:42:52 2010 +0200

    gallium: fix array texture interface changes bugs, docs

commit 4a4d927609b62b4d7fb9dffa35158afe282f277b
Author: Roland Scheidegger <sroland@vmware.com>
Date:   Thu Jun 3 22:02:44 2010 +0200

    gallium: interface changes for array textures and related cleanups

    This patch introduces array textures to gallium (note they are not immediately
    usable without the associated changes to the shader side).
    Also, this abandons pipe_subresource in favor of using level and layer
    parameters since the distinction between several faces (which was part of
    pipe_subresource for cube textures) and several z slices (which were not part
    of pipe_subresource but instead part of pipe_box where appropriate for 3d
    textures) is gone at the resource level.
    Textures, be it array, cube, or 3d, now use a "unified" set of parameters,
    there is no distinction between array members, cube faces, or 3d zslices.
    This is unlike d3d10, whose subresource index includes layer information for
    array textures, but which considers all z slices of a 3d texture to be part
    of the same subresource.
    In contrast to d3d10, OpenGL though reuses old 2d and 3d function entry points
    for 1d and 2d array textures, respectively, which also implies that for instance
    it is possible to specify all layers of a 2d array texture at once (note that
    this is not possible for cube maps, which use the 2d entry points, although
    it is possible for cube map arrays, which aren't supported yet in gallium).
    This should possibly make drivers a bit simpler, and also get rid of mutually
    exclusive parameters in some functions (as z and face were exclusive), one
    potential downside would be that 3d array textures could not easily be supported
    without reverting this, but those are nowhere to be seen.

    Also along with adjusting to new parameters, rename get_tex_surface /
    tex_surface_destroy to create_surface / surface_destroy and move them from
    screen to context, which reflects much better what those do (they are analogous
    to create_sampler_view / sampler_view_destroy).

    PIPE_CAP_ARRAY_TEXTURES is used to indicate if a driver supports all of this
    functionality (that is, both sampling from array texture as well as use a range
    of layers as a render target, with selecting the layer from the geometry shader).
2010-12-02 04:33:43 +01:00
Michal Krol 136ff67ce8 graw: Export graw_save_surface_to_file().
Allows applications to dump surfaces to file without
referencing gallium/auxiliary entry points statically.

Existing test apps have been modified such that
they save the contents of the fronbuffer only
when the `-o' option's specified.
2010-11-08 17:24:11 +01:00
José Fonseca 601498ae73 scons: Revamp how to specify targets to build.
Use scons target and dependency system instead of ad-hoc options.

Now is simply a matter of naming what to build. For example:

  scons libgl-xlib

  scons libgl-gdi

  scons graw-progs

  scons llvmpipe

and so on. And there is also the possibility of scepcified subdirs, e.g.

  scons src/gallium/drivers

If nothing is specified then everything will be build.

There might be some rough corners over the next days. Please bare with me.
2010-11-01 13:30:22 +00:00
Keith Whitwell 0072acd447 Merge remote branch 'origin/master' into lp-setup-llvm
Conflicts:
	src/gallium/drivers/llvmpipe/lp_setup_coef.c
	src/gallium/drivers/llvmpipe/lp_setup_coef.h
	src/gallium/drivers/llvmpipe/lp_setup_coef_intrin.c
	src/gallium/drivers/llvmpipe/lp_setup_point.c
	src/gallium/drivers/llvmpipe/lp_setup_tri.c
	src/gallium/drivers/llvmpipe/lp_state_derived.c
	src/gallium/drivers/llvmpipe/lp_state_fs.h
2010-10-17 19:09:42 -07:00
José Fonseca 5661e51c01 retrace: Handle clear_render_target and clear_depth_stencil. 2010-10-06 11:37:49 +01:00
José Fonseca 21f392c971 python/retrace: Handle set_index_buffer and draw_vbo. 2010-09-29 22:29:22 +01:00
José Fonseca 256b9d99fb util: Flush stdout on util_format. 2010-09-22 15:02:39 +01:00
Tilman Sauerbeck 021e68b2cd python/tests: Fixed tri.py for API and TGSI syntax changes.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
2010-09-20 21:43:01 +02:00
Keith Whitwell 7ef3d171a0 graw: add frag-face shader 2010-09-18 09:15:14 +01:00
Alex Corscadden 96c6e7e73e Add a test for the KIL opcode
This is a simple test for the KIL opcode.  It should render a 6 sided figure
with a colored interior.
2010-09-11 13:01:20 +01:00
Brian Paul 48fda8c446 graw: added test for finding shader mem leaks 2010-09-09 19:19:28 -06:00
Brian Paul 821e390018 graw: emit warnings when context/surface creation failes 2010-09-09 19:19:28 -06:00
Brian Paul d851dae919 graw: fix array size, indentation, 2010-09-09 19:19:28 -06:00
José Fonseca b8684b2458 util: Helper function to determined whether two formats can be memcpy'ed.
These are the non-trivial conversions that this function recognizes,
which was produced by u_format_compatible_test.c:

  b8g8r8a8_unorm -> b8g8r8x8_unorm
  a8r8g8b8_unorm -> x8r8g8b8_unorm
  b5g5r5a1_unorm -> b5g5r5x1_unorm
  b4g4r4a4_unorm -> b4g4r4x4_unorm
  l8_unorm -> r8_unorm
  i8_unorm -> l8_unorm
  i8_unorm -> a8_unorm
  i8_unorm -> r8_unorm
  l16_unorm -> r16_unorm
  z24_unorm_s8_uscaled -> z24x8_unorm
  s8_uscaled_z24_unorm -> x8z24_unorm
  r8g8b8a8_unorm -> r8g8b8x8_unorm
  a8b8g8r8_srgb -> x8b8g8r8_srgb
  b8g8r8a8_srgb -> b8g8r8x8_srgb
  a8r8g8b8_srgb -> x8r8g8b8_srgb
  a8b8g8r8_unorm -> x8b8g8r8_unorm
  r10g10b10a2_uscaled -> r10g10b10x2_uscaled
  r10sg10sb10sa2u_norm -> r10g10b10x2_snorm

State trackers and pipe drivers should be updated to take advantage of
this knowledge, e.g., in surface_copy.
2010-09-05 10:17:51 +01:00
José Fonseca 90437330e2 graw: Undo late loading of graw drivers.
Keith prefers a clean separation between graw applications and
implementations, where apps do not link libgallium.a but instead
get all functionality they need via graw interface.

Although this is not incompatible with late loading of graw drivers, it
it would make it very hard to maintain, as wrappers for every utility
symbol exposed in graw would have to be written or generated somehow.
2010-08-26 11:37:42 +01:00
José Fonseca f0eb02af80 graw: Dynamically load graw libraries.
This allows to build multiple graws libs simultaneously and avoid
unnecessary rebuilds of the tests.

Also remove graw_util.c from inside the graw implementation -- it was
only being provided by one implementation, and graw tests were linking
against gallium anyway.
2010-08-26 06:44:34 +01:00
Luca Barbieri ae0ef6f69f gallium: make all checks for PIPE_TEXTURE_2D check for PIPE_TEXTURE_RECT too
Searched for them with:
git grep -E '[!=]=.*PIPE_TEXTURE_2D|PIPE_TEXTURE_2D.*[!=]=|case.*PIPE_TEXTURE_2D'

Behavior hasn't been changed.
2010-08-20 12:04:00 +02:00
Vinson Lee 26c042c30a translate_test: Fix compilation with MSVC. 2010-08-12 17:12:56 -07:00
Luca Barbieri b9abe7f62c translate_test: fix compilation on non-POSIX platforms
Use a kludgy function based on rand() instead of drand48()
2010-08-12 22:10:09 +02:00
Luca Barbieri 4d946c4e8a translate_test: improve
1. Generate random data specifically for float and doubles, so that
   they end up in [0, 1] range
2. Don't test useless conversions like SCALED <-> NORM
3. Poison the buffers before testing
2010-08-12 18:36:21 +02:00
Vinson Lee e1bb9ee7a6 scons: Fix freebsd8 build. 2010-08-11 18:57:27 -07:00
Luca Barbieri 39cd4f7ceb translate_test: fix segfault on x86-64 2010-08-11 22:32:20 +02:00
Luca Barbieri 99cc6d70a4 translate_test: fix, reindent, and improve
1. Fix the segfault due to the reverted commit using the new interface
2. Reindent to Mesa 3 spaces style
3. Improve output and return success/failure with error code
4. Add much better support for testing translate_sse
2010-08-11 21:47:28 +02:00
Vinson Lee f7d7b080a1 translate: Add translate_test.c to SCons.
This is a follow-up to commit 945e38c73b,
which added translate_test.c to make.
2010-08-11 12:18:25 -07:00
Luca Barbieri 945e38c73b translate: add testsuite
Currently only checks all possible format conversions, and doesn't
attempt to test whether multiple buffers/elements or indices work.
2010-08-11 16:27:58 +02:00
Chia-I Wu d4d62b6178 graw/tests: Use pipe_context::draw_vbo.
The other drawing variants such as draw_arrays or
draw_elements_instanced were removed.

This fixes fdo bug #29287.
2010-07-29 16:21:10 +08:00
Vinson Lee b172aebfdf scons: Fix sunos5 build. 2010-07-27 18:13:47 -07:00
Brian Paul 895086467e graw/tests: pass -e option to test draw_elements_instanced() 2010-07-20 08:50:32 -06:00
Brian Paul 77e651db07 graw: new tri-instanced.c program to test instanced drawing 2010-07-15 15:42:36 -06:00
Jakob Bornecrantz ed5ce78b81 gallium: Make trivial examples use target helpers 2010-07-04 13:31:55 +01:00
Jakob Bornecrantz abbb96b2fe gallium: Fix compilation of trivial quad-tex 2010-07-04 13:09:13 +01:00
Zack Rusin 0ea927b3ad graw: add two examples using new register files 2010-06-18 13:46:44 -04:00
Zack Rusin 509ff13d06 graw: remove wrong test 2010-06-16 15:10:21 -04:00
Zack Rusin 9829ec2ad8 graw: add a gs test for non-sequential inputs 2010-06-16 05:33:46 -04:00
Zack Rusin 726f18ee69 graw: test multiple cb's in geometry shaders 2010-06-15 12:14:18 -04:00
Zack Rusin ec82e9fbfa graw: fix setup for multiple constant buffers 2010-06-15 12:01:47 -04:00
Zack Rusin 5d5fa34757 graw: small fixups for the gs examples 2010-06-14 10:49:16 -04:00
Zack Rusin 226ff53e63 gs: give our test an option of rendering a strip 2010-06-10 13:20:15 -04:00
Zack Rusin d27d45a2df graw: add a multiple primitive geometry shader test 2010-06-09 11:44:19 -04:00
Zack Rusin d4ef0f6c67 geometry shaders: make gs work with changable primitives and variable number of vertices
lots and lots of fixes for geometry shaders. in particular now we work when the gs
emits a different primitive than the one the pipeline was started with and also
we work when gs emits more vertices than would fit in the original buffer.
2010-06-09 11:13:34 -04:00
Vinson Lee 380f08f4ec graw: Fix file handle leaks. 2010-06-07 18:34:13 -07:00
Vinson Lee d09271d6ef graw: Remove unnecessary headers. 2010-06-07 18:14:34 -07:00
Vinson Lee 4af8d48a9f graw: Add gallium library to SCons build.
Fixes MSVC SCons build.
2010-06-07 16:34:03 -07:00
Keith Whitwell d095d95e77 graw: add gs-test.c and some simple geometry shader examples 2010-06-07 19:53:01 +01:00
Keith Whitwell c9c6b56e48 graw: trivial geometry shader test 2010-06-07 19:38:30 +01:00
Keith Whitwell 8a778d7bcf graw: add symlinks to shader test directories 2010-06-07 19:38:30 +01:00
Keith Whitwell 149e709701 graw: remove references to unistd.h 2010-06-07 17:53:43 +01:00
Keith Whitwell f38b2cf63f tests/graw: missing file tri.c 2010-06-07 17:22:53 +01:00
Keith Whitwell 81cb6ac042 regress: remove interpolation and semantic info from vs inputs 2010-06-07 16:34:55 +01:00
Keith Whitwell ebdb43fd98 test/graw: add vp-test 2010-06-07 16:34:55 +01:00
Keith Whitwell 78e6e081a1 tests/graw: add fp-test 2010-06-07 16:34:55 +01:00
José Fonseca dc10943038 python/retrace: Interpret resource_copy_region. 2010-05-30 10:30:01 +01:00
Roland Scheidegger 3293bcdc80 Merge branch 'gallium-msaa'
Conflicts:
	src/mesa/state_tracker/st_gen_mipmap.c
	src/mesa/state_tracker/st_texture.c
2010-05-21 20:02:22 +02:00
Keith Whitwell 519694e0fc gallium: remnants of old ccw state 2010-05-21 16:05:16 +01:00
Roland Scheidegger 8bd87b662f st/python: adapt to interface changes
compile tested only.
Should probably change the python surface_copy/fill functions
also into resource_copy/fill_region functions and adapt the code
using them.
2010-05-17 21:32:41 +02:00
José Fonseca 316b6fa509 retrace: Add sampler_view_destroy 2010-05-02 15:32:09 +01:00
Keith Whitwell c7ac03d396 graw: add quad-tex graw test for basic texturing 2010-05-14 12:19:57 +01:00
Keith Whitwell 15321a55e5 graw: combine graw_init and graw_create_window functions
Different environments seem to want to create these in different
orders.  Abstract over this by combining the calls.
2010-05-14 12:19:57 +01:00
Keith Whitwell 7375d7a5c9 graw: move towards glut-like interface, add tri.c 2010-05-14 12:19:57 +01:00
José Fonseca d99a7497ed tests/graw: raw -> graw
for consistency
2010-05-11 07:03:27 +01:00
José Fonseca 0f4e61d193 raw/clear: Make it portable. 2010-05-06 14:20:28 +01:00
José Fonseca d5e741d6d8 graw-null: New target to ensure we always have a graw implementation available. 2010-05-06 14:20:13 +01:00
José Fonseca b2e343daab tests/raw: Get it building with scons. 2010-05-05 02:39:08 +01:00
Vinson Lee 393009a939 gallium/tests: Add test case for u_cache. 2010-04-21 18:31:01 -07:00
José Fonseca 583f51ba4b retrace: Support index bias. 2010-04-19 18:17:11 +02:00
José Fonseca d036e9312f retrace: Fix vertex/index/constant buffer dumping. 2010-04-18 10:36:28 +02:00
José Fonseca 5c898af870 retrace: Remove deprecated code. 2010-04-18 10:36:28 +02:00
Jakob Bornecrantz 29ff6e87f5 gallium/tests: Make trivial apps depend on libs 2010-04-18 02:50:35 +01:00
Jakob Bornecrantz 3e3d6864da gallium/tests: Fix trivial examples 2010-04-17 21:13:23 +01:00
Vinson Lee c8efed89ba gallium/tests: Add test case for pipe_barrier. 2010-04-14 18:06:54 -07:00
Vinson Lee 30d99ff7e0 progs/gallium: Fix relative path in Makefile. 2010-04-14 01:17:24 -07:00
José Fonseca c57bac1f13 retrace: Update for recent interface changes. 2010-04-14 10:22:57 +09:00
José Fonseca 6917ef10f2 progs/gallium: Move into src/gallium/tests
Two reasons:
- progs will eventually have its own repository
- it is just to easy to forget updating the
  code for interface changes when it is outside of src
2010-04-13 07:05:46 +09:00