Commit graph

263 commits

Author SHA1 Message Date
Michal Krol
ed7bb2c196 gallium: Use macro parameter names consistently. 2009-03-16 12:39:07 +01:00
Michal Krol
bf6ed0b962 gallium: pipe_mutex_init() is of type void.
Both the windows and fallback versions are void already.
2009-03-16 12:36:22 +01:00
Michal Krol
13dad5294b gallium: Include p_compiler.h for integer types. 2009-03-16 12:27:47 +01:00
Thomas Hellstrom
cf25ef9072 gallium: Use struct pipe_atomic for pipe refcounts.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-16 11:40:47 +01:00
Thomas Hellstrom
fc1ef97c33 gallium: Add simple atomic class api.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-03-16 11:40:18 +01:00
Keith Whitwell
683e7091a9 gallium: consolidate bypass_vs and bypass_clipping flags
The draw module provides a similar interface to the driver which
is retained as various bits of hardware may be able to take on
incremental parts of the vertex pipeline.  However, there's no
need to advertise all this complexity to the state tracker.

There are basically two modes now - normal and passthrough/screen-coords.
2009-03-13 16:42:57 +00:00
Jakob Bornecrantz
f500f3a72c gallium: Remove do_flip argument from surface_copy
I should have gotten most uses and implementation
	correctly fixed, but things might break.

	Feel free to blame me.
2009-03-13 01:38:20 +01:00
Michal Krol
fb88908f5c tgsi: Consider INDEX, NEGATE, MULTIPLYMATRIX opcodes for removal. 2009-03-10 10:27:24 +01:00
Michel Dänzer
a2aedf95d8 gallium: Fix p_refcnt.h for C++ compilers. 2009-03-09 12:58:16 +01:00
José Fonseca
2a1f29c220 gallium: Use consistent semantics for map ranges in gallium.
Which are slightly different from ARB_map_buffer_range semantics, since
gallium still supports more than one mapping of the same buffer.
2009-03-04 17:48:26 +00:00
José Fonseca
e80d330419 gallium: Ensure map ranges are valid. 2009-03-04 16:07:51 +00:00
José Fonseca
5b04939b16 Merge commit 'origin/master' into gallium-map-range 2009-03-04 15:23:35 +00:00
Michel Dänzer
5e27cd46c0 gallium: Unify reference counting.
The core reference counting code is centralized in p_refcnt.h.

This has some consequences related to struct pipe_buffer:

* The screen member of struct pipe_buffer must be initialized, or
  pipe_buffer_reference() will crash trying to destroy a buffer with reference
  count 0. u_simple_screen takes care of this, but I may have missed some of
  the drivers not using it.
* Except for rare exceptions deep in winsys code, buffers must always be
  allocated via pipe_buffer_create() or via screen->*buffer_create() rather
  than via winsys->*buffer_create().
2009-03-04 11:58:48 +01:00
Jakob Bornecrantz
16526b7099 st/drm: s/hocks/hooks/ 2009-03-03 22:18:14 +01:00
José Fonseca
190db8b4c3 gallium: Massage the interface to more closely resemble ARB_map_buffer_range 2009-03-03 18:52:16 +00:00
José Fonseca
c7e46c1857 Merge commit 'origin/master' into gallium-map-range 2009-03-03 13:18:15 +00:00
Keith Whitwell
916de35d67 Merge commit 'origin/gallium-0.1'
Conflicts:

	scons/gallium.py
	src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c
	src/gallium/include/pipe/p_defines.h
	src/mesa/vbo/vbo_exec_api.c
	src/mesa/vbo/vbo_exec_draw.c
2009-03-03 11:51:14 +00:00
José Fonseca
cfc3d5c219 gallium: New PIPE_BUFFER_USAGE_DONTBLOCK flag.
To prevent blocking when mapping a buffer.
2009-03-02 17:33:25 +00:00
José Fonseca
97a1fd158c Merge commit 'origin/master' into gallium-map-range 2009-03-02 13:27:46 +00:00
Corbin Simpson
7a10fcb7b6 Include p_compiler.h in drm_api.h for boolean typedef. 2009-02-27 12:25:09 -08:00
Jakob Bornecrantz
24a94d13c9 st/drm: Seperate get handle for global buffer ids 2009-02-27 03:35:01 +01:00
Benjamin Close
dbab39c6ca gallium: Add support for BSD operating systems, tested with FreeBSD
BSD supports pipe in the same way as linux hence options which
are safe for linux are also safe for BSD. Define PIPE_OS_BSD in
include/pipe/p_config.h and adjust the defines to make use of it.

Also define MAP_ANONYMOUS for BSD systems which use MAP_ANON

Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
2009-02-25 07:56:43 -07:00
Jakob Bornecrantz
25b32eb8d0 st/drm: Bring drm_api.h up to date with latest changes 2009-02-25 02:00:29 +01:00
José Fonseca
60e5fe6506 gallium: Allow to specify how much will be read / was written in buffer map/unmap.
This allows the pipe driver to do more efficient DMA upload/downloads, by
avoiding to read/write unneeded/unmodified data.
2009-02-24 12:29:09 +00:00
José Fonseca
693fac8ae2 gallium: Add pipe_buffer_write/read inlines.
Saves code, and will simplify future interface changes.
2009-02-24 11:30:25 +00:00
Alan Hourihane
6b72227270 gallium: add winsys interface for viewport changes to support DRI2 2009-02-23 20:28:55 +00:00
José Fonseca
67387bf33f gallium: Define PIPE_PRIM_MAX. 2009-02-23 12:56:45 +00:00
Michel Dänzer
aba88b7ed7 gallium: Add pipe_transfer_reference(). 2009-02-18 18:12:31 +01:00
Michel Dänzer
3bd7c5ceff Merge branch 'gallium-texture-transfer'
Conflicts:
	src/gallium/drivers/softpipe/sp_tile_cache.c
2009-02-18 16:43:02 +01:00
Keith Whitwell
59d54334c9 Merge branch 'master' into gallium-texture-transfer
Conflicts:

	src/mesa/state_tracker/st_cb_accum.c
	src/mesa/state_tracker/st_cb_drawpixels.c
2009-02-16 19:50:48 +00:00
José Fonseca
ea4bf267e4 util: Move p_debug.h into util module.
The debug functions depend on several util function for os abstractions, and
these depend on debug functions, so a seperate module is not possible.
2009-02-18 12:05:26 +00:00
Michal Krol
bf3930453c gallium: Rename Size member of TGSI token to NrTokens.
Driver writers often got confused and assumed Size to be
the number of immediate values in Immediate declaration.
2009-02-10 15:12:34 +01:00
Michel Dänzer
4617981ec7 gallium: No longer allow CPU mapping surfaces directly.
Instead, a new pipe_transfer object has to be created and mapped for
transferring data between the CPU and a texture. This gives the driver more
flexibility for textures in address spaces that aren't CPU accessible.

This is a first pass; softpipe/xlib builds and runs glxgears, but it only shows
a black window. Looks like something's off related to the Z buffer, so the
depth test always fails.
2009-02-05 19:41:18 +01:00
Brian Paul
099e9d20f0 gallium: fixup #includes: p_screen.h does not need anything in p_state.h 2009-02-05 08:23:00 -07:00
Brian Paul
0703b2e9ad gallium: move 'struct pipe_winsys'
Not used in p_state.h but used in p_context.h and p_screen.h
2009-02-05 08:16:56 -07:00
Zack Rusin
5069bfed29 gallium: remove pipe_buffer from surfaces
this change disassociates, at least from the driver perspective,
the surface from buffer. surfaces are technically now views on the
textures so make it so by hiding the buffer in the internals of
textures.
2009-02-02 23:47:16 -05:00
Zack Rusin
26c9b15343 gallium: add a convience wrapper for simple screens
forwards screen calls to the winsys
2009-01-30 17:59:55 -05:00
Zack Rusin
adfbba476d gallium: make p_winsys internal
move it to pipe/internal/p_winsys_screen.h and start converting
the state trackers to the screen usage
2009-01-30 15:57:33 -05:00
Zack Rusin
b3028acd98 gallium: give the screen priority when it comes to buffer allocations
allows the driver to overwrite buffer allocation, first step on the way
to making winsys interface internal to the drivers. state trackers and
the code above it will go through the screen
2009-01-29 21:43:15 -05:00
Zack Rusin
4f5308bdcb gallium: remove redundant size from the constant buffer
reuse the size of the actual buffer
2009-01-27 12:20:26 -05:00
Zack Rusin
d6888e811d gallium: it's a reference value, not a reference number 2009-01-27 12:20:26 -05:00
Zack Rusin
2299f21f8d gallium: standardize api on the prefix "nr" 2009-01-27 12:20:25 -05:00
Zack Rusin
a7e72231e3 gallium: standardize naming of masks 2009-01-27 12:20:25 -05:00
Zack Rusin
872b515e8f gallium: standardize on stride instead of pitch in the interface 2009-01-27 12:20:25 -05:00
José Fonseca
5897383344 gallium: Remove the standalone surfaces.
This commit is mostly just a cosmetic change that cleans-up the interfaces,
replacing pipe_winsys::surface_* calls by

   /**
    * Allocate storage for a display target surface.
    *
    * Often surfaces which are meant to be blitted to the front screen (i.e.,
    * display targets) must be allocated with special characteristics, memory
    * pools, or obtained directly from the windowing system.
    *
    * This callback is invoked by the pipe_screenwhen creating a texture marked
    * with the PIPE_TEXTURE_USAGE_DISPLAY_TARGET flag  to get the underlying
    * buffer storage.
    */
   struct pipe_buffer *(*surface_buffer_create)(struct pipe_winsys *ws,
                                        unsigned width, unsigned height,
                                        enum pipe_format format,
                                        unsigned usage,
                                        unsigned *stride);

Most drivers were updated but not all were tested. Use the softpipe pipe
driver and the xlib winsys changes as a reference when fixing other drivers.
2009-01-20 12:22:49 +00:00
Brian Paul
b9a3952f8f gallium: minor reformatting 2009-01-19 12:55:35 -07:00
Keith Whitwell
b5db6b039c Merge commit 'origin/gallium-0.2' into gallium-xlib-rework 2009-01-19 10:15:04 +00:00
Younes Manton
0521c2682a gallium: Add PIPE_BUFFER_USAGE_DISCARD.
When passed to map() signals that the buffer's previous contents are
not required, allowing the driver to allocate a new buffer if the
current buffer can not be mapped immediately.
2009-01-18 21:40:10 -05:00
Jakob Bornecrantz
7047f1755f egl: Add a egl state_tracker that use Gallium
This works on top Gallium and KMS. The only thing that
	does not work currently is swap buffers for shown mesa
	screens. So the only fun thing this will produce is a
	white screen.

	The driver wishing to us the state_tracker needs to
	implement the intrace as define in drm_api.h located
	in gallium/include/state_tracker. And also have a
	working KMS implementation.
2009-01-18 15:40:12 +01:00
Keith Whitwell
8f3fac6107 debug: add noprefix version of debug_dump_enum 2009-01-17 18:45:20 +00:00