mesa.git
14 years agomesa: remove _mesa_compressed_texture_size_glenum() stub
Brian Paul [Sun, 25 Oct 2009 23:32:56 +0000 (17:32 -0600)]
mesa: remove _mesa_compressed_texture_size_glenum() stub

14 years agomesa: remove _mesa_compressed_row_stride()
Brian Paul [Sun, 25 Oct 2009 23:25:46 +0000 (17:25 -0600)]
mesa: remove _mesa_compressed_row_stride()

14 years agomesa: remove calls to _mesa_compressed_row_stride()
Brian Paul [Sun, 25 Oct 2009 23:23:37 +0000 (17:23 -0600)]
mesa: remove calls to _mesa_compressed_row_stride()

14 years agoglide: remove _mesa_compressed_row_stride() calls
Brian Paul [Sun, 25 Oct 2009 23:21:25 +0000 (17:21 -0600)]
glide: remove _mesa_compressed_row_stride() calls

And fix incorrect first parameter.

14 years agomesa: remove _mesa_compressed_row_stride() calls
Brian Paul [Sun, 25 Oct 2009 23:21:11 +0000 (17:21 -0600)]
mesa: remove _mesa_compressed_row_stride() calls

14 years agomesa: begin removing _mesa_compressed_row_stride() calls
Brian Paul [Sun, 25 Oct 2009 23:20:13 +0000 (17:20 -0600)]
mesa: begin removing _mesa_compressed_row_stride() calls

Use equivalent _mesa_format_row_stride() function instead.

14 years agomesa: simplify texture_row_stride() helper
Brian Paul [Sun, 25 Oct 2009 23:15:02 +0000 (17:15 -0600)]
mesa: simplify texture_row_stride() helper

14 years agomesa: fix-up error checking related to compressed texture block size
Brian Paul [Sun, 25 Oct 2009 23:07:06 +0000 (17:07 -0600)]
mesa: fix-up error checking related to compressed texture block size

14 years agomesa: clean-up, simplify compressed texture size checking
Brian Paul [Sun, 25 Oct 2009 22:59:08 +0000 (16:59 -0600)]
mesa: clean-up, simplify compressed texture size checking

14 years agomesa: remove _mesa_compressed_texture_size()
Brian Paul [Sat, 24 Oct 2009 22:49:57 +0000 (16:49 -0600)]
mesa: remove _mesa_compressed_texture_size()

Use _mesa_format_image_size() instead.

14 years agomesa: remove ctx->Driver.CompressedTextureSize() hook
Brian Paul [Sat, 24 Oct 2009 22:34:18 +0000 (16:34 -0600)]
mesa: remove ctx->Driver.CompressedTextureSize() hook

It always just called _mesa_compressed_texture_size() anyway.

14 years agomesa: change compressed texture size calls
Brian Paul [Sat, 24 Oct 2009 22:28:24 +0000 (16:28 -0600)]
mesa: change compressed texture size calls

Replace calls to ctx->Driver.CompressedTextureSize with calls to
_mesa_format_image_size.  The former always called the later.

14 years agomesa: minor clean-ups in _mesa_store_compressed_texsubimage2d()
Brian Paul [Sat, 24 Oct 2009 18:04:09 +0000 (12:04 -0600)]
mesa: minor clean-ups in _mesa_store_compressed_texsubimage2d()

14 years agomesa: simplify _mesa_compressed_row_stride(), _mesa_compressed_image_address()
Brian Paul [Sat, 24 Oct 2009 17:52:31 +0000 (11:52 -0600)]
mesa: simplify _mesa_compressed_row_stride(), _mesa_compressed_image_address()

_mesa_compressed_row_stride() can go away soon.
_mesa_compressed_image_address() can be generalized and moved to formats.c

14 years agomesa: s/GLuint/gl_format/
Brian Paul [Sat, 24 Oct 2009 17:41:25 +0000 (11:41 -0600)]
mesa: s/GLuint/gl_format/

14 years agomesa: move assertion after declaration
Brian Paul [Sat, 24 Oct 2009 17:34:27 +0000 (11:34 -0600)]
mesa: move assertion after declaration

14 years agomesa: remove hard-coded block sizes
Brian Paul [Sat, 24 Oct 2009 17:33:58 +0000 (11:33 -0600)]
mesa: remove hard-coded block sizes

14 years agomesa: added _mesa_get_format_block_size()
Brian Paul [Sat, 24 Oct 2009 17:33:10 +0000 (11:33 -0600)]
mesa: added _mesa_get_format_block_size()

14 years agoprogs/tests: fix sub texture offsets
Brian Paul [Sat, 24 Oct 2009 17:08:01 +0000 (11:08 -0600)]
progs/tests: fix sub texture offsets

14 years agomesa: added _mesa_get_format_name()
Brian Paul [Sat, 24 Oct 2009 14:43:16 +0000 (08:43 -0600)]
mesa: added _mesa_get_format_name()

14 years agomesa: additional comments in format code
Brian Paul [Sat, 24 Oct 2009 14:41:08 +0000 (08:41 -0600)]
mesa: additional comments in format code

14 years agodri/drivers: update driNewRenderbuffer() to take a gl_format
Brian Paul [Fri, 23 Oct 2009 01:49:21 +0000 (19:49 -0600)]
dri/drivers: update driNewRenderbuffer() to take a gl_format

Now pass a specific MESA_FORMAT_x token to indicate the renderbuffer's
format.  This is better than passing a GLenum and having to guess the
specific format.

I'm unable to test all the drivers, but any issues should be easy to fix.

14 years agoradeon: simplify radeon_create_renderbuffer()
Brian Paul [Fri, 23 Oct 2009 01:20:38 +0000 (19:20 -0600)]
radeon: simplify radeon_create_renderbuffer()

14 years agor600: fix depth span macros for format changes
Alex Deucher [Thu, 22 Oct 2009 18:48:45 +0000 (14:48 -0400)]
r600: fix depth span macros for format changes

14 years agoradeon: fix some renderbuffer format bugs
Brian Paul [Thu, 22 Oct 2009 18:26:17 +0000 (12:26 -0600)]
radeon: fix some renderbuffer format bugs

14 years agoprogs/tests: draw Z values as luminance, no pixel zoom
Brian Paul [Thu, 22 Oct 2009 03:51:06 +0000 (21:51 -0600)]
progs/tests: draw Z values as luminance, no pixel zoom

14 years agoi915: replace MESA_FORMAT_Z24_S8 with MESA_FORMAT_S8_Z24
Brian Paul [Thu, 22 Oct 2009 03:47:58 +0000 (21:47 -0600)]
i915: replace MESA_FORMAT_Z24_S8 with MESA_FORMAT_S8_Z24

And change parameter type.

14 years agoradeon: get rid of z24s8 <-> s8z24 conversions in span code
Brian Paul [Thu, 22 Oct 2009 03:20:05 +0000 (21:20 -0600)]
radeon: get rid of z24s8 <-> s8z24 conversions in span code

Can just use s8z24 everywhere.
Note: the WRITE_DEPTH macro for R600 may need to be fixed.

14 years agoradeon: replace MESA_FORMAT_Z24_S8 with MESA_FORMAT_S8_Z24
Brian Paul [Thu, 22 Oct 2009 03:12:23 +0000 (21:12 -0600)]
radeon: replace MESA_FORMAT_Z24_S8 with MESA_FORMAT_S8_Z24

Core Mesa deals with MESA_FORMAT_S8_Z24 everywhere it should so
we shouldn't have to use MESA_FORMAT_Z24_S8 anymore.

14 years agointel: use MESA_FORMAT_S8_Z24 format and avoid z24s8/s8z24 conversions
Brian Paul [Thu, 22 Oct 2009 02:02:33 +0000 (20:02 -0600)]
intel: use MESA_FORMAT_S8_Z24 format and avoid z24s8/s8z24 conversions

14 years agoi965: change parameter type to gl_format
Brian Paul [Thu, 22 Oct 2009 02:00:43 +0000 (20:00 -0600)]
i965: change parameter type to gl_format

14 years agomesa: use MESA_FORMAT_X8_Z24
Brian Paul [Thu, 22 Oct 2009 01:58:00 +0000 (19:58 -0600)]
mesa: use MESA_FORMAT_X8_Z24

14 years agomesa: use MESA_FORMAT_X8_Z24 format
Brian Paul [Thu, 22 Oct 2009 01:56:18 +0000 (19:56 -0600)]
mesa: use MESA_FORMAT_X8_Z24 format

14 years agomesa: added MESA_FORMAT_X8_Z24 format
Brian Paul [Thu, 22 Oct 2009 01:55:44 +0000 (19:55 -0600)]
mesa: added MESA_FORMAT_X8_Z24 format

24-bit Z in 32-bit pixel.  We could probably use the MESA_FORMAT_S8_Z24
format but this there's a few places where we explicitly don't want stencil.
This format may go away at some point in the future.

14 years agodri/common: updated #includes
Brian Paul [Thu, 15 Oct 2009 20:57:45 +0000 (14:57 -0600)]
dri/common: updated #includes

14 years agodri/common: use _mesa_little_endian() and update comments
Brian Paul [Thu, 15 Oct 2009 20:54:32 +0000 (14:54 -0600)]
dri/common: use _mesa_little_endian() and update comments

14 years agodri/common: fix broken _dri_texformat_* initializations
Brian Paul [Thu, 15 Oct 2009 20:49:53 +0000 (14:49 -0600)]
dri/common: fix broken _dri_texformat_* initializations

14 years agoradeon: initialize renderbuffer Format field in radeon_create_renderbuffer()
Brian Paul [Wed, 14 Oct 2009 19:14:22 +0000 (13:14 -0600)]
radeon: initialize renderbuffer Format field in radeon_create_renderbuffer()

Plus, use MESA_FORMAT_S8_Z24 everywhere.

14 years agomesa: remove a bunch of gl_renderbuffer fields
Brian Paul [Fri, 9 Oct 2009 02:27:27 +0000 (20:27 -0600)]
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.

14 years agomesa: added MESA_FORMAT_XRGB8888
Brian Paul [Wed, 7 Oct 2009 04:30:01 +0000 (22:30 -0600)]
mesa: added MESA_FORMAT_XRGB8888

14 years agomesa: added case for MESA_FORMAT_SIGNED_RGBA_16
Brian Paul [Wed, 7 Oct 2009 01:01:43 +0000 (19:01 -0600)]
mesa: added case for MESA_FORMAT_SIGNED_RGBA_16

14 years agomesa: added MESA_FORMAT_SIGNED_RGBA_16 for accum buffers
Brian Paul [Wed, 7 Oct 2009 01:00:09 +0000 (19:00 -0600)]
mesa: added MESA_FORMAT_SIGNED_RGBA_16 for accum buffers

14 years agomesa: added _mesa_get_format_color_encoding()
Brian Paul [Wed, 7 Oct 2009 00:56:29 +0000 (18:56 -0600)]
mesa: added _mesa_get_format_color_encoding()

14 years agomesa: accept more pnames in _mesa_get_format_bits()
Brian Paul [Wed, 7 Oct 2009 00:54:13 +0000 (18:54 -0600)]
mesa: accept more pnames in _mesa_get_format_bits()

14 years agodrivers: don't include texformat.h
Brian Paul [Tue, 6 Oct 2009 00:11:35 +0000 (18:11 -0600)]
drivers: don't include texformat.h

And remove other unneeded #includes while we're at it.

14 years agomesa: don't include texformat.h
Brian Paul [Mon, 5 Oct 2009 23:56:31 +0000 (17:56 -0600)]
mesa: don't include texformat.h

14 years agomesa: move _mesa_format_to_type_and_comps() to formats.c
Brian Paul [Mon, 5 Oct 2009 23:54:20 +0000 (17:54 -0600)]
mesa: move _mesa_format_to_type_and_comps() to formats.c

14 years agomesa: move gl_format_info struct to formats.c
Brian Paul [Mon, 5 Oct 2009 23:50:33 +0000 (17:50 -0600)]
mesa: move gl_format_info struct to formats.c

This is a private datatype.

14 years agomesa: remove feature tests
Brian Paul [Mon, 5 Oct 2009 23:48:22 +0000 (17:48 -0600)]
mesa: remove feature tests

14 years agomesa: use FetchTexelf() instead of FetchTexelc()
Brian Paul [Mon, 5 Oct 2009 23:28:39 +0000 (17:28 -0600)]
mesa: use FetchTexelf() instead of FetchTexelc()

14 years agomesa: add parenthesis
Brian Paul [Mon, 5 Oct 2009 23:27:50 +0000 (17:27 -0600)]
mesa: add parenthesis

14 years agomesa: lift _mesa_set_fetch_functions() calls out of drivers
Brian Paul [Mon, 5 Oct 2009 23:12:36 +0000 (17:12 -0600)]
mesa: lift _mesa_set_fetch_functions() calls out of drivers

Call it from in the main Mesa glTexImage functions.

14 years agomesa: make _mesa_get_texel_fetch_func() static
Brian Paul [Mon, 5 Oct 2009 22:52:26 +0000 (16:52 -0600)]
mesa: make _mesa_get_texel_fetch_func() static

14 years agomesa: removed gl_texture_image::CompressedSize field
Brian Paul [Fri, 2 Oct 2009 03:13:25 +0000 (21:13 -0600)]
mesa: removed gl_texture_image::CompressedSize field

Just call ctx->Driver.CompressedTextureSize() when we need to get
the compressed image size.

14 years agomesa: reformatting
Brian Paul [Fri, 2 Oct 2009 01:01:02 +0000 (19:01 -0600)]
mesa: reformatting

14 years agoprogs/tests: additional debug code
Brian Paul [Thu, 1 Oct 2009 22:43:22 +0000 (16:43 -0600)]
progs/tests: additional debug code

14 years agomesa: move mesa_set_fetch_functions()
Brian Paul [Thu, 1 Oct 2009 22:42:37 +0000 (16:42 -0600)]
mesa: move mesa_set_fetch_functions()

14 years agoradeon: fix tx_table[] entry
Brian Paul [Thu, 1 Oct 2009 22:41:47 +0000 (16:41 -0600)]
radeon: fix tx_table[] entry

XXX need to still verify that the table entries are in correct order.

14 years agosavage: s/Xfree/_mesa_free/
Brian Paul [Thu, 1 Oct 2009 22:41:24 +0000 (16:41 -0600)]
savage: s/Xfree/_mesa_free/

14 years agomesa: simplify _mesa_compressed_texture_size()
Brian Paul [Thu, 1 Oct 2009 22:30:47 +0000 (16:30 -0600)]
mesa: simplify _mesa_compressed_texture_size()

14 years agomesa: remove gl_texture_image::IsCompressed field
Brian Paul [Thu, 1 Oct 2009 22:29:44 +0000 (16:29 -0600)]
mesa: remove gl_texture_image::IsCompressed field

Use _mesa_is_format_compressed() instead.

14 years agomesa: added _mesa_format_row_stride()
Brian Paul [Thu, 1 Oct 2009 22:27:23 +0000 (16:27 -0600)]
mesa: added _mesa_format_row_stride()

14 years agomesa: added _mesa_format_image_size()
Brian Paul [Thu, 1 Oct 2009 21:59:13 +0000 (15:59 -0600)]
mesa: added _mesa_format_image_size()

14 years agoswrast: fix some texformat regressions
Brian Paul [Thu, 1 Oct 2009 04:50:05 +0000 (22:50 -0600)]
swrast: fix some texformat regressions

Need to be careful with component ordering for MESA_FORMAT_RGB888
and MESA_FORMAT_RGBA8888.

14 years agomesa: rename texformat_tmp.h to texfetch_tmp.h
Brian Paul [Thu, 1 Oct 2009 03:08:06 +0000 (21:08 -0600)]
mesa: rename texformat_tmp.h to texfetch_tmp.h

14 years agomesa: remove MESA_FORMAT_RGBA4444
Brian Paul [Thu, 1 Oct 2009 03:04:14 +0000 (21:04 -0600)]
mesa: remove MESA_FORMAT_RGBA4444

Not used by any hardware driver.  ARGB4444 and ARGB4444_REV remain.

14 years agomesa: remove GLchan-based formats; use hw 8-bit/channel formats instead
Brian Paul [Thu, 1 Oct 2009 03:00:16 +0000 (21:00 -0600)]
mesa: remove GLchan-based formats; use hw 8-bit/channel formats instead

Removed: MESA_FORMAT_RGBA, RGB, ALPHA, LUMINANCE, LUMINANCE_ALPHA, INTENSITY.

14 years agomesa: move texel fetch/store into new texfetch.[ch] files
Brian Paul [Thu, 1 Oct 2009 02:47:54 +0000 (20:47 -0600)]
mesa: move texel fetch/store into new texfetch.[ch] files

14 years agost/mesa: update comment
Brian Paul [Thu, 1 Oct 2009 02:36:25 +0000 (20:36 -0600)]
st/mesa: update comment

14 years agomesa: remove gl_texture_format
Brian Paul [Thu, 1 Oct 2009 02:35:32 +0000 (20:35 -0600)]
mesa: remove gl_texture_format

14 years agomesa: replace gl_texture_format with gl_format
Brian Paul [Thu, 1 Oct 2009 02:28:45 +0000 (20:28 -0600)]
mesa: replace gl_texture_format with gl_format

Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum.
ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x.
gl_texture_format will go away next.

14 years agomesa: move StoreTexImageFunc typedef to .c file
Brian Paul [Tue, 29 Sep 2009 03:55:47 +0000 (21:55 -0600)]
mesa: move StoreTexImageFunc typedef to .c file

14 years agomesa: use _mesa_texstore()
Brian Paul [Tue, 29 Sep 2009 03:52:43 +0000 (21:52 -0600)]
mesa: use _mesa_texstore()

14 years agost/mesa: use _mesa_texstore()
Brian Paul [Tue, 29 Sep 2009 03:52:23 +0000 (21:52 -0600)]
st/mesa: use _mesa_texstore()

14 years agomesa: make individual texstore functions static
Brian Paul [Tue, 29 Sep 2009 03:49:38 +0000 (21:49 -0600)]
mesa: make individual texstore functions static

14 years agoglide: use _mesa_texstore()
Brian Paul [Tue, 29 Sep 2009 03:49:10 +0000 (21:49 -0600)]
glide: use _mesa_texstore()

14 years agodrivers: use _mesa_texstore
Brian Paul [Tue, 29 Sep 2009 03:46:34 +0000 (21:46 -0600)]
drivers: use _mesa_texstore

14 years agodrivers: use new _mesa_texstore() function
Brian Paul [Tue, 29 Sep 2009 03:41:11 +0000 (21:41 -0600)]
drivers: use new _mesa_texstore() function

14 years agomesa: new _mesa_texstore() function
Brian Paul [Tue, 29 Sep 2009 03:40:50 +0000 (21:40 -0600)]
mesa: new _mesa_texstore() function

14 years agomesa: change _mesa_format_to_type_and_comps() format parameter type
Brian Paul [Mon, 28 Sep 2009 03:32:12 +0000 (21:32 -0600)]
mesa: change _mesa_format_to_type_and_comps() format parameter type

14 years agomesa: sort texstore_funcs[] array, remove search loop
Brian Paul [Mon, 28 Sep 2009 03:22:57 +0000 (21:22 -0600)]
mesa: sort texstore_funcs[] array, remove search loop

14 years agomesa: fix render buffer _BaseFormat assignment
Brian Paul [Mon, 28 Sep 2009 03:14:43 +0000 (21:14 -0600)]
mesa: fix render buffer _BaseFormat assignment

14 years agomesa: use texture format functions
Brian Paul [Mon, 28 Sep 2009 03:14:12 +0000 (21:14 -0600)]
mesa: use texture format functions

14 years agomesa: update comments
Brian Paul [Mon, 28 Sep 2009 03:13:46 +0000 (21:13 -0600)]
mesa: update comments

14 years agomesa: use more mesa format functions
Brian Paul [Mon, 28 Sep 2009 03:07:57 +0000 (21:07 -0600)]
mesa: use more mesa format functions

14 years agomesa: fix GL_TEXTURE_LUMINANCE_SIZE query
Brian Paul [Mon, 28 Sep 2009 02:59:28 +0000 (20:59 -0600)]
mesa: fix GL_TEXTURE_LUMINANCE_SIZE query

14 years agomesa: use more mesa format functions
Brian Paul [Mon, 28 Sep 2009 02:58:05 +0000 (20:58 -0600)]
mesa: use more mesa format functions

14 years agomesa: use more mesa format functions
Brian Paul [Mon, 28 Sep 2009 02:56:04 +0000 (20:56 -0600)]
mesa: use more mesa format functions

14 years agomesa: use more format helper functions
Brian Paul [Mon, 28 Sep 2009 02:51:18 +0000 (20:51 -0600)]
mesa: use more format helper functions

14 years agomesa: code movement
Brian Paul [Mon, 28 Sep 2009 02:40:53 +0000 (20:40 -0600)]
mesa: code movement

14 years agodrivers: use more mesa format functions
Brian Paul [Mon, 28 Sep 2009 02:40:35 +0000 (20:40 -0600)]
drivers: use more mesa format functions

14 years agomesa/drivers: use _mesa_get_format_bytes()
Brian Paul [Mon, 28 Sep 2009 02:24:59 +0000 (20:24 -0600)]
mesa/drivers: use _mesa_get_format_bytes()

14 years agomesa/drivers: use _mesa_get_format_bytes()
Brian Paul [Mon, 28 Sep 2009 02:07:41 +0000 (20:07 -0600)]
mesa/drivers: use _mesa_get_format_bytes()

14 years agovia: use mesa texture format helper functions
Brian Paul [Mon, 28 Sep 2009 01:58:18 +0000 (19:58 -0600)]
via: use mesa texture format helper functions

14 years agoglide: use _mesa_get_format_bytes()
Brian Paul [Mon, 28 Sep 2009 01:53:54 +0000 (19:53 -0600)]
glide: use _mesa_get_format_bytes()

14 years agomesa: use _mesa_get_format_base_format()
Brian Paul [Mon, 28 Sep 2009 01:51:45 +0000 (19:51 -0600)]
mesa: use _mesa_get_format_base_format()

14 years agomesa: use _mesa_get_format_bytes()
Brian Paul [Mon, 28 Sep 2009 01:49:51 +0000 (19:49 -0600)]
mesa: use _mesa_get_format_bytes()

14 years agomesa: added _mesa_get_format_datatype()
Brian Paul [Mon, 28 Sep 2009 01:42:36 +0000 (19:42 -0600)]
mesa: added _mesa_get_format_datatype()

14 years agomesa: use _mesa_get_format_bits()
Brian Paul [Mon, 28 Sep 2009 01:38:21 +0000 (19:38 -0600)]
mesa: use _mesa_get_format_bits()

14 years agomesa: added _mesa_get_format_bits()
Brian Paul [Mon, 28 Sep 2009 01:07:44 +0000 (19:07 -0600)]
mesa: added _mesa_get_format_bits()