Commit Graph

68 Commits

Author SHA1 Message Date
Marek Olšák
2b41399bb4 mesa: remove unused function _mesa_new_depthstencil_renderbuffer
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-06-24 22:09:27 +02:00
Brian Paul
42d377224a mesa: fix void pointer arithmetic warning 2011-04-20 12:04:25 -06:00
Eric Anholt
b31a99367c mesa: Add renderbuffer accessors for A, I, L, FLOAT32.
Of these, intel will be using I and L initially, and A once we rewrite
fragment shaders and the CC for rendering to it as R.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-20 10:35:42 -07:00
Eric Anholt
bad08969b5 mesa: Add renderbuffer accessors for MESA_FORMAT_R_FLOAT32, RG_FLOAT32.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-20 10:35:42 -07:00
Eric Anholt
ba99c2fbd9 mesa: Add renderbuffer accessors for MESA_FORMAT_RGBA_FLOAT32.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-20 10:35:41 -07:00
Brian Paul
7ca38f5d97 mesa: fix void pointer arithmetic warnings
And fix a couple logic errors in the put_*_generic() functions.
2011-04-18 13:01:05 -06:00
Eric Anholt
f0471d904c mesa: Add renderbuffer accessors for R8/RG88/R16/RG1616.
This will replace the current (broken by trying to use an enum in the
preprocessor) spantmp2.h support I wrote for the intel driver.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-18 11:19:54 -07:00
Eric Anholt
a52803e108 mesa: Use _mesa_get_format_bytes to refactor out the RB get_row_*
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-18 11:19:54 -07:00
Eric Anholt
6ab9889a27 mesa: Use _mesa_get_format_bytes to refactor out the RB get_pointer_*
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-18 11:19:54 -07:00
Eric Anholt
0778fdb002 intel: Use Mesa core's renderbuffer accessors for depth.
Since we're using GTT mappings now (no manual detiling), there's
really nothing special to accessing these buffers, other than needing
the new RowStride field of gl_renderbuffer to accomodate padding.

Reduces the driver size by 2.7kb, and improves glean depthStencil
performance 3-10x (!)

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-18 11:19:54 -07:00
Eric Anholt
9f164823c7 mesa: Add a function to set up the default renderbuffer accessors.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-18 11:19:53 -07:00
Eric Anholt
155200c154 mesa: Add a gl_renderbuffer.RowStride field like textures have.
This will allow some drivers to reuse the core renderbuffer.c get/put
row functions in place of using the spantmp.h macros.  Note that
unlike textures, we use a signed integer here to allow for handling
FBO orientation.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-18 11:19:53 -07:00
Eric Anholt
91226ce648 mesa: Remove renderbuffer deletion debug field.
It has presumably served its purpose by now, and other object deletion
doesn't do this.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-04-18 11:19:53 -07:00
Brian Paul
fdb04c0384 mesa: work around failed assertion for GL_RGBA16_SNORM accum buffer
We use this format to represent the accum buffer.  No snorm texture
sampling or rendering takes place.

Fixes failed assertion with swrast and any app using the accum buffer
(and glxinfo).
2011-04-04 14:37:28 -06:00
Brian Paul
62c66b3430 mesa: plug in fallback function for ctx->Driver.ValidateFramebuffer()
The software renderer doesn't support GL_ALPHA, GL_LUMINANCE, etc
so we should report GL_FRAMEBUFFER_UNSUPPORTED during FBO validation.
2011-01-24 19:38:52 -07:00
Brian Paul
65da73c5f8 mesa: s/GLuint/gl_buffer_index/ 2011-01-03 14:01:41 -07:00
Brian Paul
fc70c05dbd mesa: fix aux/accum comment and error message mixups 2010-11-02 09:56:04 -06:00
Kristian Høgsberg
f9995b3075 Drop GLcontext typedef and use struct gl_context instead 2010-10-13 09:43:25 -04:00
Nicolas Kaiser
9674929bce main: remove duplicated includes
Remove duplicated includes.

Signed-off-by: Brian Paul <brianp@vmware.com>
2010-09-30 09:36:31 -06:00
Brian Paul
8ea614832d mesa: use GL_RGBA16_SNORM for accum buffer 2010-05-09 21:19:42 -06:00
Brian Paul
d148e25953 mesa: remove some color index code 2010-05-04 21:59:54 -06:00
Brian Paul
7f07ac80eb mesa: remove renderbuffer adaptor calls
Was only used for OSMesa but no longer needed.
2010-05-04 21:59:54 -06:00
Ian Romanick
3d0f608e13 mesa: Remove _mesa_add_color_index_renderbuffers
After all the recent color-index visual support removal,
_mesa_add_color_index_renderbuffers is no longer used anywhere.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Ian Romanick
22a96f3058 mesa: Remove checks of Visual.rgbMode
This must always be true now, so there is no reason to check it.  Ever.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-03 12:37:04 -08:00
Brian Paul
fe25476c04 mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage()
The rb->InternalFormat field will be set by the caller if the allocation
succeeds.  Until then, this field's value can't be used.  Fixes a failed
assertion with FlightGear.
2010-02-26 09:03:34 -07:00
Brian Paul
a858bc393e mesa: added renderbuffer->_BaseFormat assertion 2010-02-25 20:11:54 -07:00
Kristian Høgsberg
32f2fd1c5d Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions 2010-02-19 12:03:01 -05:00
Brian Paul
6bf1ea897f mesa: replace _mesa_bzero() with memset() 2010-02-19 08:32:36 -07:00
Kenneth Graunke
26f8fad145 Remove _mesa_memset in favor of plain memset.
This may break the SUNOS4 build, but it's no longer relevant.
2010-02-19 09:18:57 -05:00
Kenneth Graunke
c7ac486261 Remove _mesa_memcpy in favor of plain memcpy.
This may break the SUNOS4 build, but it's no longer relevant.
2010-02-19 09:18:36 -05:00
Brian Paul
1f196b786d Merge branch 'texformat-rework'
Conflicts:
	src/mesa/drivers/dri/radeon/radeon_fbo.c
	src/mesa/drivers/dri/s3v/s3v_tex.c
	src/mesa/drivers/dri/s3v/s3v_xmesa.c
	src/mesa/drivers/dri/trident/trident_context.c
	src/mesa/main/debug.c
	src/mesa/main/mipmap.c
	src/mesa/main/texformat.c
	src/mesa/main/texgetimage.c
2009-10-28 21:24:11 -06:00
Brian Paul
c55b355fd4 mesa: use MESA_FORMAT_X8_Z24 2009-10-21 19:58:00 -06:00
Brian Paul
ce64e063a8 mesa: fix incorrect assertion in _mesa_add_aux_renderbuffers()
Fixes bug 24426.
2009-10-09 13:22:00 -06:00
Brian Paul
45e76d2665 mesa: remove a bunch of gl_renderbuffer fields
_ActualFormat is replaced by Format (MESA_FORMAT_x).
ColorEncoding, ComponentType, RedBits, GreenBits, BlueBits, etc. are
all replaced by MESA_FORMAT_x queries.
2009-10-08 20:27:27 -06:00
Brian Paul
e97681c7f5 mesa: merge gallium-0.2 into gallium-master-merge
Merge commit 'origin/gallium-0.2' into gallium-master-merge

Conflicts:

	Makefile
	docs/relnotes-7.4.html
	docs/relnotes.html
	src/mesa/drivers/dri/i965/brw_wm.h
	src/mesa/main/imports.c
	src/mesa/main/mtypes.h
	src/mesa/main/texcompress.c
	src/mesa/main/texenvprogram.c
	src/mesa/main/version.h
	src/mesa/vbo/vbo_exec_api.c
	src/mesa/vbo/vbo_save_draw.c
2009-02-09 09:22:22 -07:00
Brian Paul
d9a2cf9246 mesa: add new ColorEncoding and ComponentType to gl_renderbuffer 2009-01-22 15:07:10 -07:00
Brian Paul
00d90fe845 gallium: remove stray include of st_context.h 2008-06-10 12:07:38 -06:00
Brian
6349bd3112 remove some temporary hacks 2007-08-10 11:16:53 -06:00
Brian
f5713c7d2e Checkpoint intel_renderbuffer removal.
Remove surface ptr from gl_renderbuffer.
Use st_renderbuffer in most places.
More clean-up.
2007-08-09 14:29:48 -06:00
Brian
5fd4606591 s/Z24_S8/S8_Z24/ (stencil is in the high byte) 2007-08-01 13:04:58 -06:00
Brian
d28661870a sp_z_surface.h is dead 2007-07-31 17:55:32 -06:00
Brian
20adf45c23 Redesign pipe_surface in terms of pipe_region.
struct pipe_buffer goes away.
Added basic region functions to softpipe to allocate/release malloc'd regions.
Surface-related code is fairly coherent now.
2007-07-31 17:42:03 -06:00
Brian
9bc1c92a0b 32 and z24s8 softpipe buffers 2007-07-30 21:39:57 -06:00
Brian
4576d754c9 Lots of improvements to the surface-related code.
Z testing now works with i915 driver.
Add gl_renderbuffer::surface pointer (and reverse pointer).
Remove intel_surface and xmesa_surface types - no longer used.
2007-07-30 17:17:44 -06:00
Brian
0cae814f36 temporary add some extra renderbuffer debug code 2007-04-05 09:28:09 -06:00
Brian
3fe47d5c57 updated debug printf 2007-04-02 09:57:27 -06:00
Brian
42aaa548a1 Fix some renderbuffer reference counting issues. Also fixes a mem leak. 2007-03-25 10:39:36 -06:00
Brian
8e1c3bd0b4 Implement alpha buffer copy for SwapBuffers().
Nicolai writes:
When the pixmap pixel format has no alpha channel, the x11 driver
(software rendering) adds a wrapped alpha channel on request.

During SwapBuffers, this alpha channel is not copied from back to
front, which means that the front buffer doesn't really contain the
contents that the back buffer previously contained.

A subsequent glReadPixels from the front buffer will return an
incorrect result. The following patch attempts to fix this.
2007-03-23 18:01:31 -06:00
Brian
e5070bc3ca Assorted fixes for dealing with zero-size frame/renderbuffers.
In xmesa_check_and_update_buffer_size() handle xmctx==NULL correctly: still
call _mesa_resize_framebufer().  If we don't we can wind up in a situation
where the framebuffer size is non-zero but an attached renderbuffer size
is still initialized to zero.  This inconsistancy can later cause problems.
Check for zero-size renderbuffers in update_color_draw_buffers() and
update_color_read_buffer().
See bug 7205.
2007-03-16 11:00:07 -06:00
Brian
a510bc3ee1 Fix/improve framebuffer object reference counting.
Use _mesa_reference_framebuffer() and _mesa_unreference_framebuffer() functions
to be sure reference counting is done correctly.  Additional assertions are
done too.  Note _mesa_dereference_framebuffer() renamed to "unreference" as
that's more accurate.
2007-03-06 10:07:59 -07:00