Commit graph

330 commits

Author SHA1 Message Date
Keith Whitwell
1bb60d25e0 gallium: remove remaining references to origin_lower_left 2009-03-21 10:55:45 +00:00
Jakob Bornecrantz
c9a318a7c6 trace: Formalize on a standard for data size pair 2009-03-19 19:18:38 +01:00
Jakob Bornecrantz
b95789ddb9 trace: Fix memory leak 2009-03-16 21:34:03 +01:00
Jakob Bornecrantz
068fd6d50b trace: Re-init refcounters just incase 2009-03-16 20:33:30 +01:00
Jakob Bornecrantz
f73066fbd5 trace: Dump buffer data via buffer writes 2009-03-16 20:15:25 +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
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
d5d5b27224 trace: Fix some typos 2009-03-13 05:40:10 +01: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
Jakob Bornecrantz
e8ee34e7f3 trace: Wrap pipe_buffers 2009-03-12 16:35:43 +01:00
Jakob Bornecrantz
53e5248b0a trace: Add dump util functions for wrapped pointers 2009-03-12 16:35:43 +01:00
Jakob Bornecrantz
808f322799 trace: Move buffer functions from winsys to screen 2009-03-11 22:47:15 +01:00
Jakob Bornecrantz
4225120503 trace: Remove all whitespace at EOL 2009-03-11 22:47:15 +01:00
Jakob Bornecrantz
5d418f7155 trace: Fixup trace a bit 2009-03-11 22:47:14 +01:00
Jakob Bornecrantz
b6b198ea1b trace: Fixup trace a bit 2009-03-11 14:43:28 +01:00
Michel Dänzer
45bde75bd6 gallium: Remove some superfluous instances of #include "p_inlines.h". 2009-03-04 11:58:52 +01: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
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
d9602e5144 gallium: Improve makefiles for libraries
The template makefile that most libraries in
	gallium included was based on dri and had a bunch
	unrelevant junk in it.

	Update it and improve the depending makefiles.
2009-02-20 10:22:10 +00:00
Michel Dänzer
c738edcc68 gallium: Fix up trace driver for introduction of struct pipe_transfer. 2009-02-18 18:13:44 +01: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
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
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
Keith Whitwell
e3734593ae Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
Conflicts:

	progs/glsl/Makefile
2009-01-09 10:08:06 +00:00
Keith Whitwell
002dfb12fc gallium: split driver-independent code out of xlib winsys
Place in new xlib state-tracker.  This is a statetracker for the GLX API.
2009-01-08 14:10:56 +00:00
José Fonseca
ab3a9f1eed gallium: Replace uint64 by standard uint64_t.
uint64 is not (so?) standard, and often redefined by third parties,
causing name clashes.
2009-01-08 12:41:45 +00:00
José Fonseca
eef2edadf3 trace: Fix typo in build instructions. 2008-09-16 20:24:43 +09:00
José Fonseca
d25611ede0 trace: Request a growable file. 2008-09-08 22:57:01 +09:00
José Fonseca
2444c0c81a trace: Use util's stream. 2008-09-08 11:09:48 +09:00
Brian Paul
4f25420bdd gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.h
Also, rename p_tile.[ch] to u_tile.[ch]
2008-08-24 17:48:55 -06:00
Michal Krol
ec7415642d trace: Include u_string.h. 2008-08-23 12:31:50 +02:00
José Fonseca
807a7487ff trace: Don't trace texture/surfaces releases, only destructions. 2008-08-22 03:14:24 +01:00
José Fonseca
152d00d199 trace: Use a 4 hexadecimal digit suffix. 2008-08-22 03:13:27 +01:00
José Fonseca
34d12c1787 trace: Hack to detect writes to user buffers.
It often happens that new data is written directly to the user buffers
without mapping/unmapping. This hack marks user buffers and dumps them
before passing them to pipe context.
2008-08-21 18:46:04 +01:00
José Fonseca
0fff3e4ea9 trace: Split the output stream on windows.
Because windows limits the ammount of memory that can be mapped.
2008-08-21 18:46:04 +01:00
José Fonseca
d27ffb8c6d trace: Fix pipe_clip_state dump. 2008-08-19 21:35:06 +01:00
José Fonseca
200d6dcc83 trace: Support C++. 2008-08-19 21:35:06 +01:00
José Fonseca
90a1c6e403 trace: Explain how to integrate with a state tracker or winsys. 2008-08-18 20:47:41 +01:00
José Fonseca
747762f379 trace: Preliminary stream implementation for GDI. 2008-08-18 20:47:41 +01:00
José Fonseca
d042f415fc trace: Use long longs to ensure covering 64bits integers. 2008-08-18 20:47:41 +01:00
José Fonseca
6a31bb6ad8 trace: Get the trace file from the GALLIUM_TRACE option itself. 2008-08-18 20:47:40 +01:00
José Fonseca
9d58b2a432 trace: Fix typo. 2008-08-15 11:20:57 +01:00
José Fonseca
f40de50def trace: Wrap all textures and surface created by the pipe driver.
That is,

Unfortunately, this causes a regression in softpipe, where the
output gets tyled.
2008-08-15 10:35:19 +01:00