Commit graph

234 commits

Author SHA1 Message Date
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
Younes Manton
fbf418d9dc gallium: Define PIPE_TEXTURE_USAGE_DYNAMIC.
Knowing how the client intends to use the texture will give the
driver the opportunity to optimize for such cases.
2009-01-10 13:52:04 -05: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
b3b7c757a9 gallium: Don't redefine INLINE.
INLINE is commonly used in third-party headers.
2008-12-30 17:14:48 +00:00
Michal Krol
208f50ec37 gallium: Fix PIPE_FORMAT_X8B8G8R8_SNORM definition. 2008-12-15 11:33:18 +00:00
Roland Scheidegger
fd2492d244 gallium: fixes for srgb, new srgb formats
add some more srgb texture formats, including compressed ones
various fixes relating to srgb formats

issues: the util code for generating mipmaps will not handle srgb formats
        correctly (would need to use a linear->srgb conversion shader)
2008-12-12 05:12:55 +01:00
Brian
7eb8b37735 gallium: added PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS query 2008-12-04 09:58:54 -07:00
Younes Manton
1c22c04525 gallium: Make room for custom PIPE_TEXTURE_USAGE_* flags. 2008-12-02 16:15:12 -05:00
Alan Hourihane
4af0d940a3 Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts:

	scons/gallium.py
	src/gallium/auxiliary/pipebuffer/pb_buffer.h
2008-11-25 09:28:30 +00:00
Brian Paul
868c607c17 tgsi: doxygen comments 2008-11-24 13:11:05 -07:00
Brian Paul
434e255eae tgsi: add tgsi_declaration fields for centroid sampling, invariant optimization 2008-11-24 13:11:05 -07:00
José Fonseca
d600c805c0 gallium: Define convenience shortcuts for CPU/GPU READ/WRITE flag combinations. 2008-11-24 13:45:19 +09:00
Brian Paul
80a718a63b Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts:

	src/gallium/auxiliary/rtasm/rtasm_execmem.c
	src/mesa/shader/slang/slang_emit.c
	src/mesa/shader/slang/slang_log.c
	src/mesa/state_tracker/st_atom_framebuffer.c
2008-11-05 15:58:09 -07:00
José Fonseca
467c4760b3 gallium: Ensure refcounts of live objects are never zero. 2008-11-03 22:35:13 +09:00
Keith Whitwell
52e6fbb655 gallium: recognize DEBUG as well as DBG for debugging 2008-10-28 16:28:56 +00:00
Brian Paul
7004582c18 gallium: implement tests for PPC/PPC64 2008-10-21 14:12:17 -06:00
José Fonseca
4d7394f892 gallium: Introduce PIPE_ARCH_SSE define for SSE support.
Besides meaning x86 and x86-64 architecture, it also depends on SSE2
support enabled on gcc.

This fixes the linux-debug build.
2008-10-07 14:25:09 +09:00
Brian Paul
bac5900a14 cell: align instruction buffers to 8-byte, not 32-byte boundary 2008-09-26 10:15:35 -06:00
Brian Paul
bef3444f41 gallium: added ALIGN32_ATTRIB 2008-09-19 17:56:45 -06:00
José Fonseca
984a7c4e9c gallium: Fix doxygen comments. 2008-09-19 10:40:42 +09:00
José Fonseca
1da0a13389 util: Dump surfaces to BMP.
This allows quick inspection of surfaces in mass scale.
2008-09-08 22:21:33 +09:00
Michal Krol
78a4589b10 gallium: Add pipe_thread primitives for PIPE_OS_LINUX. 2008-09-05 16:55:51 +02:00
Michal Krol
a0b5ac424b gallium: Add pipe_thread primitives for PIPE_SUBSYSTEM_WINDOWS_USER config. 2008-09-05 15:10:47 +02:00
José Fonseca
53979d0a35 gallium: New pf_has_alpha utility function. 2008-09-05 10:31:38 +09:00
Brian Paul
5531c986bd gallium: comments about nblocksx/y, etc 2008-09-03 14:23:22 -06:00
José Fonseca
f637a96e85 gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.
We want to use the pipe_buffer_* inlines everywhere, but a pipe context
is not always available nor is it needed.
2008-09-03 11:53:39 +09:00
Brian Paul
e54f1abca7 gallium: removed p_pointer.h (use util/u_pointer.h instead) 2008-09-01 15:33:19 -06:00
José Fonseca
a341586d03 gallium: s/PIPE_OS_WINDOWS/PIPE_SUBSYSTEM_WINDOWS_USER/ in p_thread.
PIPE_OS_WINDOWS is an umbrella for all Windows variants and subsystems,
PIPE_SUBSYSTEM_WINDOWS_USER is just for user-space windows (e.g., OpenGL),
and the thread primitives currently included in p_thread only support the
later.
2008-08-28 06:53:57 +09:00