aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
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]>
* swrast: fix more store_texel() bugsBrian Paul2011-09-181-4/+4
| | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412 on swrast.
* gallium: move clear paths from rgba to a pointer to a color union (v2)Dave Airlie2011-09-181-11/+11
| | | | | | | | | | | | | | | This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values. Notes: 1. the value is opaque. 2. only when the value is used should it be interpretered according to the surface format it is going to be used with. 3. float clears on integer buffers and vice-versa are undefined. v2: fixed up vega and graw, dropped hunks that shouldn't have been in patch. Signed-off-by: Dave Airlie <[email protected]>
* mesa: use ctx->Driver.AllocTextureImageBuffer() to alloc texture memoryBrian Paul2011-09-172-41/+21
|
* mesa: plug in swrast texture image alloc/free functionsBrian Paul2011-09-171-1/+2
| | | | Use the swrast allocation/free functions instead of core Mesa.
* swrast: add Alloc/FreeTextureImageBuffer() driver functionsBrian Paul2011-09-172-0/+48
| | | | | Not called yet. These will replace the core Mesa functions for allocating and freeing malloc'd texture memory.
* mesa: add AllocTextureImageBuffer() driver hookBrian Paul2011-09-171-0/+6
|
* mesa: move gl_texture_image::FetchTexel fields to swrastBrian Paul2011-09-1715-355/+378
| | | | | This also involves passing swrast_texture_image instead of gl_texture_image into all the fetch functions.
* swrast: plug in _swrast_new/delete_texture_image() functionsBrian Paul2011-09-171-2/+2
|
* radeon: make radeon_texture_image a subclass of swrast_texture_imageBrian Paul2011-09-175-32/+43
|
* intel: make intel_texture_image a subclass of swrast_texture_imageBrian Paul2011-09-178-93/+101
| | | | | We need to subclass swrast_texture_image because if we use swrast for fallback rendering, we'll need to have swrast_texture_image objects.
* swrast: introduce new swrast_texture_image structBrian Paul2011-09-173-0/+63
| | | | | No subclass fields yet. Subsequent patches will add the fields related to software rendering that are currently in gl_texture_image.
* mesa: add new DeleteTextureImage() driver hookBrian Paul2011-09-177-2/+34
| | | | | | 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-179-24/+26
| | | | 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-175-18/+7
| | | | | | 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
|
* meta: fix/add checks for GL_EXT_framebuffer_sRGBBrian Paul2011-09-171-2/+4
| | | | | | | This fixes spurious GL errors when the GL_EXT_framebuffer_sRGB extension is not supported. Note: This is a candidate for the 7.11 branch
* mesa: s/short/ushort/ in unpack_SIGNED_RGBA_16()Brian Paul2011-09-171-1/+1
|
* Change strerror(ret) to strerror(-ret).Eugeni Dodonov2011-09-151-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]>
* st/mesa: rewrap a long lineBrian Paul2011-09-151-3/+4
|
* 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]>
* DRI: Log something if we don't support legacy DRIAndrew Deason2011-09-141-1/+3
| | | | | | | | If we are called via the legacy DRI interface, and we don't support legacy DRI (InitScreen is NULL), print a debug message, so it is easy to see why the driver fails to initialize. See https://bugs.freedesktop.org/show_bug.cgi?id=40437
* st/mesa: fix/update comment on st_translate_color()Brian Paul2011-09-141-2/+3
|
* 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-149-50/+21
| | | | | | | | | 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-1418-140/+146
| | | | | | | | | | 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]>
* st/mesa: fix incorrect debug outputBrian Paul2011-09-131-3/+2
| | | | format and type are not GL enums here.
* 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]>
* st/mesa: clamp Max program param limitsMarek Olšák2011-09-121-2/+2
| | | | | | | | | | Setting just MAX_PROGRAM_ENV_PARAMS to 4096 breaks everything, so let's do this instead. This fixes: https://bugs.freedesktop.org/show_bug.cgi?id=40767 Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: use UARL instead of I2F and ARLBryan Cain2011-09-101-10/+6
| | | | | | | | | Since TGSI now has a UARL opcode that takes an integer as the source, it is no longer necessary to hack around the lack of an integer ARL opcode using I2F. UARL is only emitted when native integers are enabled; ARL is still used otherwise. 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)
* glsl_to_tgsi: fix shadow2DArray comparisonMarek Olšák2011-09-101-3/+14
| | | | v2: adjust the assertion, add a comment