aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Advertise GL_OES_compressed_paletted_texture in OpenGL ES1.xIan Romanick2011-09-191-1/+1
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Remove redundant compressed paletted texture error checksIan Romanick2011-09-191-29/+5
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Refactor compressed texture error checks to work with paletted texturesIan Romanick2011-09-191-11/+70
| | | | | | | | | | | | | This code was really broken before. A lot of the error checks were done much later (too late), and some of the error checks would fail. The underlying problem is that Mesa doesn't ever keep compressed paletted textures in their original format. The textures are immediately converted to some RGB or RGBA format. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39991 Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Add _mesa_cpal_compressed_format_typeIan Romanick2011-09-192-0/+20
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Refactor expected texture size check in cpal_get_infoIan Romanick2011-09-192-13/+35
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_formatIan Romanick2011-09-191-0/+19
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Add GL_OES_compressed_paletted_texture formats to ↵Ian Romanick2011-09-191-0/+13
| | | | | | | | _mesa_is_compressed_format Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: fix error handling for glMapBufferRangeYuanhan Liu2011-09-191-0/+11
| | | | | | | | Accroding the man page, GL_INVALID_VALUE would generated if access has any bits set other than those valid defined bits. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: generate GL_INVALID_OPERATION in glIsEnabledIndex() between Begin/EndBrian Paul2011-09-191-0/+1
|
* mesa: fix error handling for glSelectBufferYuanhan Liu2011-09-191-0/+5
| | | | | | | According the man page, trigger a GL_INVALID_VALUE if size < 0. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: fix error handling for glPixelZoomYuanhan Liu2011-09-191-0/+2
| | | | | | | | | According the man page, GL_INVALID_OPERATION should generated if glPixelZoom is executed between the execution of glBegin and the corresponding execution of glEnd. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: fix error handling for glIsEnabledYuanhan Liu2011-09-191-0/+2
| | | | | | | | | According the man page, GL_INVALID_OPERATION should be generated if glIsEnabled is executed betwwen the execution of glBegin and the correspoding execution of glEnd. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: fix error handling for glTexEnvYuanhan Liu2011-09-191-1/+2
| | | | | | | | Fix error handling while calling glTexEnv with invalid texture environment parameters. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: fix error handling for some glGet* functionsYuanhan Liu2011-09-191-0/+15
| | | | | | | | | | | | | | | According to the man page, it should trigger a GL_INVALID_OPERATION while calling some glGet* functions inside glBegin and glEnd. This patch dose handle the following functions: glGetBooleanv glGetFloatv glGetIntegerv glGetInteger64v glGetDoublev Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: fix error handling for glEvalMesh1/2DYuanhan Liu2011-09-191-0/+4
| | | | | | | | According man page, trigger error when calling glEvalMesh1/2D inside glBegin/glEnd. Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: use ctx->Driver.AllocTextureImageBuffer() to alloc texture memoryBrian Paul2011-09-172-41/+21
|
* mesa: add AllocTextureImageBuffer() driver hookBrian Paul2011-09-171-0/+6
|
* mesa: move gl_texture_image::FetchTexel fields to swrastBrian Paul2011-09-179-103/+74
| | | | | This also involves passing swrast_texture_image instead of gl_texture_image into all the fetch functions.
* mesa: add new DeleteTextureImage() driver hookBrian Paul2011-09-173-2/+7
| | | | | | Matches the NewTextureImage() hook. With new subclasses of gl_texture_image coming we need a new hook to properly delete objects of those subclasses.
* mesa: move software texel fetch code into swrastBrian Paul2011-09-174-3444/+0
| | | | It's only used by swrast now so move it out of core Mesa.
* mesa: move _mesa_update_fetch_functions() calls into swrastBrian Paul2011-09-173-11/+1
| | | | | | Do it during swrast state validation since the FetchTexel() functions are only called from swrast now and not core Mesa. Remove assertions in mipmap.c since they're no longer appropriate.
* mesa: implement unpack_SIGNED_GR1616 in format_unpack.cBrian Paul2011-09-171-1/+5
|
* mesa: s/short/ushort/ in unpack_SIGNED_RGBA_16()Brian Paul2011-09-171-1/+1
|
* mesa: fix error handling for dlist image unpackingBrian Paul2011-09-151-1/+14
| | | | | | | | | | | | | | | When compiling glDrawPixels, glTexImage(), etc. and we're copying the user's image we need to be careful about GL error checking. Previously, we were incorrectly generating GL_OUT_OF_MEMORY in unpack_image() if width <= 0 or height <= 0 or for invalid format/type values. We now check those arguments in unpack_image() and return NULL if there's a bad value. The command will get compiled with the arguments as-is and image=NULL. Later, when the command is executed the correct errors will be generated. This issue was reported by Yuanhan Liu <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: add missing ')' in error messageBrian Paul2011-09-151-1/+1
|
* uniforms: accept all int/unsigned int sampler types in uniform checks.Dave Airlie2011-09-151-0/+22
| | | | | | | | | | I'm not 100% sure about this, it may need a version check or it might be completely wrong. added multisample ones as well. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: minor clean-up on _mesa_unclamped_float_rgba_to_ubyte()Brian Paul2011-09-141-1/+7
| | | | Add a comment and reformat to be under 80 columns.
* mesa: white space, comment fixes in mtypes.hBrian Paul2011-09-141-7/+14
| | | | "vale" was a typo. Fix that and do some other minor clean-ups.
* mesa/colormac: introduce inline helper for 4 unclamped float to ubyte.Dave Airlie2011-09-142-7/+8
| | | | | | | | | This introduces an UNCLAMPED_FLOAT_TO_UBYTE x 4 inline function, as suggested by Brian. It uses it in a few places I noticed from previous color changes, and also some core mesa places. I haven't updated other places yet. Signed-off-by: Dave Airlie <[email protected]>
* mesa: introduce a clear color union to be used for int/unsigned buffersDave Airlie2011-09-146-68/+54
| | | | | | | | | | This introduces a new gl_color_union union and moves the current ClearColorUnclamped to use it, it removes current ClearColor completely and renames CCU to CC, then all drivers are modified to expected unclamped floats instead. also fixes st to use translated color in one place it wasn't. Signed-off-by: Dave Airlie <[email protected]>
* mesa/pack: don't apply transfer operations to integer format buffers. (v3)Dave Airlie2011-09-131-0/+23
| | | | | | | | | | | | | | | | | The EXT_texture_integer issues says: Should pixel transfer operations be defined for the integer pixel path? RESOLVED: No. Fragment shaders can achieve similar results with more flexibility. There is no need to aggrandize this legacy mechanism. v2: fix comments, fix unpack paths, use same comment/code v3: fix last comment Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix more valgrind warningsMarek Olšák2011-09-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ==27540== Invalid read of size 4 ==27540== at 0x96277B7: _mesa_make_extension_string (string3.h:144) ==27540== by 0x9604E78: _mesa_make_current (context.c:1514) ==27540== by 0x9602A8B: st_api_make_current (st_manager.c:789) ==27540== by 0x45406E7: ??? ==27540== Address 0xad35b30 is 3,688 bytes inside a block of size 3,691 alloc'd ==27540== at 0x4025315: calloc (vg_replace_malloc.c:467) ==27540== by 0x9627641: _mesa_make_extension_string (extensions.c:910) ==27540== by 0x9604E78: _mesa_make_current (context.c:1514) ==27540== by 0x9602A8B: st_api_make_current (st_manager.c:789) ==27540== by 0x45406E7: ??? And: ==28351== Invalid write of size 2 ==28351== at 0x4C087CC: _mesa_make_extension_string (string3.h:144) ==28351== by 0x4BE6198: _mesa_make_current (context.c:1514) ==28351== by 0x4BD4CAB: st_api_make_current (st_manager.c:789) ==28351== Address 0x48dd1f3 is 19 bytes inside a block of size 20 alloc'd ==28351== at 0x4025315: calloc (vg_replace_malloc.c:467) ==28351== by 0x4C08711: _mesa_make_extension_string (extensions.c:778) ==28351== by 0x4BE6198: _mesa_make_current (context.c:1514) ==28351== by 0x4BD4CAB: st_api_make_current (st_manager.c:789) ==28351== ==28351== Invalid read of size 4 ==28351== at 0x4C087EC: _mesa_make_extension_string (extensions.c:806) ==28351== by 0x4BE6198: _mesa_make_current (context.c:1514) ==28351== by 0x4BD4CAB: st_api_make_current (st_manager.c:789) ==28351== Address 0x48dd1f4 is 0 bytes after a block of size 20 alloc'd ==28351== at 0x4025315: calloc (vg_replace_malloc.c:467) ==28351== by 0x4C08711: _mesa_make_extension_string (extensions.c:778) ==28351== by 0x4BE6198: _mesa_make_current (context.c:1514) ==28351== by 0x4BD4CAB: st_api_make_current (st_manager.c:789) The first part adds 2, because ' ' and '\0' may be written at the end of the buffer.
* mesa: fix a valgrind warningMarek Olšák2011-09-101-1/+1
| | | | | | | | | | | | ==5715== Invalid read of size 4 ==5715== at 0x4AA590B: _mesa_make_extension_string (extensions.c:908) ==5715== by 0x4A83198: _mesa_make_current (context.c:1514) ==5715== by 0x4A71CAB: st_api_make_current (st_manager.c:789) ==5715== Address 0x4795730 is 0 bytes inside a block of size 1 alloc'd ==5715== at 0x4025315: calloc (vg_replace_malloc.c:467) ==5715== by 0x4AA5B4C: _mesa_make_extension_string (extensions.c:772) ==5715== by 0x4A83198: _mesa_make_current (context.c:1514) ==5715== by 0x4A71CAB: st_api_make_current (st_manager.c:789)
* nvprogram: Silence "warning: unused parameter ‘ctx’"Ian Romanick2011-09-092-2/+2
|
* mesa: Silence "main/teximage.h:148:72: warning: unused parameter ‘texObj’"Ian Romanick2011-09-091-0/+1
|
* mesa: remove unneeded #include of texfetch.hBrian Paul2011-09-081-1/+0
|
* mesa: use _mesa_unpack_float_z_row in get_tex_depth()Brian Paul2011-09-081-5/+7
| | | | Removes another use of the gl_texture_image::FetchTexelf() function.
* mesa: use ctx->Driver.GetTexImage() to decompress base texture imageBrian Paul2011-09-081-42/+43
| | | | | This is a simple way to do the job and it removes one more use of the soon-to-be-removed gl_texture_image::FetchTexelc() function.
* mesa: handle compressed images in get_tex_rgba()Brian Paul2011-09-081-58/+106
| | | | | | Uses the new _mesa_decompress_image() function. Unlike the meta path that uses textured quad rendering to do decompression, this works with signed formats as well.
* mesa: new _mesa_decompress_image() functionBrian Paul2011-09-082-0/+91
| | | | | Use the old texture fetch functions to decompress a whole image. To be used by glGetTexImage().
* mesa: added _mesa_get_uncompressed_format(), _mesa_format_num_components()Brian Paul2011-09-082-0/+71
|
* mesa: add new pixel format unpacking codeBrian Paul2011-09-082-0/+1543
| | | | | This will be used instead of the texel fetch code to unpack images in various formats.
* gles: Fix glGet(GL_{NUM_,}COMPRESSED_TEXTURE_FORMATS_ARB)Adam Jackson2011-09-081-1/+2
| | | | | | | We'd still accept the GL_PALETTE[48]_* formats in glCompressedTexImage2D, but they wouldn't be listed if you queried whether they were supported. Signed-off-by: Adam Jackson <[email protected]>
* Define INLINE macro in terms of inline.José Fonseca2011-09-081-15/+16
|
* varray.c: fix logic around BGRA with ARB_vertex_type_2_10_10_10_rev.Dave Airlie2011-09-071-4/+11
| | | | | | | | | I introduced a regression in here, I've just split the logic ot now, so its easier to read/understand. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=40664 Signed-off-by: Dave Airlie <[email protected]>
* mesa: whitespace fixes, just to be consistentBrian Paul2011-09-061-2/+7
|
* mesa: put _mesa_ prefix on vert_result_to_frag_attrib()Brian Paul2011-09-061-4/+4
|
* mesa: fix vert_result_to_frag_attrib() parameter typeBrian Paul2011-09-061-2/+2
|
* mesa: s/inline/INLINE/ to fix MSVC buildBrian Paul2011-09-061-2/+2
|
* mesa: Remove support for unpacking from client memory to color-index pixelsIan Romanick2011-09-061-40/+12
| | | | | | | Mesa hasn't supported color-index rendering for a long time. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>