summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* 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
* ir_to_mesa: fix shadow2DArray comparisonMarek Olšák2011-09-101-3/+14
| | | | | | The depth should be in W. v2: adjust the assertion, add a comment
* st/mesa: convert shadow array samplers to TGSIMarek Olšák2011-09-101-0/+2
|
* gallium: add PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERSMarek Olšák2011-09-101-1/+4
| | | | v2: remove PIPE_CAP_ARRAY_TEXTURES in favor of the new CAP.
* dri: Remove all extension enabling utility functionsIan Romanick2011-09-094-148/+0
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* swrast-dri: Remove call to driInitExtensionsIan Romanick2011-09-091-2/+0
| | | | | | | | The only purpose this call served in the DRI swrast driver was to initialize the remap table. Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver.
* radeon: Enable extensions by just setting the flagsIan Romanick2011-09-091-59/+39
| | | | | | | | | | | | | | | | | Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver. Since the call to _mesa_enable_imaging_extensions (via driInitExtensions) is removed, EXT_blend_color, EXT_blend_logic_op, and EXT_blend_minmax are no longer advertised. These all resulted in software fallbacks, so their loss will not be mourned. EXT_blend_subtract is, however, explicitly added to the list. GL_FUNC_SUBTRACT is fully accelerated, but GL_FUNC_REVERSE_SUBTRACT (still) results in a software fallback. Cc: Alex Deucher <[email protected]> Cc: Dave Airlie <[email protected]>
* r600: Enable extensions by just setting the flagsIan Romanick2011-09-091-105/+61
| | | | | | | | | | | | | | | | Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver. Since the call to _mesa_enable_imaging_extensions (via driInitExtensions) is removed, EXT_blend_color is explicitly added to the list. EXT_blend_logic_op is removed from the list of extensions because blend factors and separate blend equations are not handled correctly. Cc: Alex Deucher <[email protected]> Cc: Dave Airlie <[email protected]>
* r300: Enable extensions by just setting the flagsIan Romanick2011-09-091-100/+62
| | | | | | | | | | | | | | | | | | | Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver. Since the call to _mesa_enable_imaging_extensions (via driInitExtensions) is removed, EXT_blend_color is explicitly added to the list. EXT_blend_logic_op is removed from the list of extensions because blend factors and separate blend equations are not handled correctly. Based on feedback from Roland Scheidegger. Cc: Dave Airlie <[email protected]> Cc: Alex Deucher <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Corbin Simpson <[email protected]>
* r200: Enable extensions by just setting the flagsIan Romanick2011-09-091-107/+63
| | | | | | | | | | | | | | | | | | Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver. Since the call to _mesa_enable_imaging_extensions (via driInitExtensions) is removed, EXT_blend_color is explicitly added with a dependency on the drmSupportsBlendColor flag. EXT_blend_logic_op is removed from the list of extensions because blend factors and separate blend equations are not handled correctly. Based on feedback from Roland Scheidegger. Cc: Alex Deucher <[email protected]> Cc: Dave Airlie <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nouveau: Enable extensions by just setting the flagsIan Romanick2011-09-093-43/+28
| | | | | | | | | | | | | | | | | Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver. Since the call to _mesa_enable_imaging_extensions (via driInitExtensions) is removed, EXT_blend_color, EXT_blend_minmax, and EXT_blend_subtract are explicitly added to the list. EXT_blend_logic_op is removed from the list of extensions because blend factors and separate blend equations are not handled correctly. Cc: Ben Skeggs <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Cc: Viktor Novotný <[email protected]>
* intel: Move S3TC extension enable bits to intel_extensions.cIan Romanick2011-09-092-7/+8
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Enable extensions by just setting the flagsIan Romanick2011-09-091-191/+98
| | | | | | | | | | | | Core Mesa already does the dispatch offset remapping for every function that could possibly ever be supported. There's no need to continue using that cruft in the driver. EXT_blend_logic_op is removed from the list of extensions because blend factors and separate blend equations are not handled correctly. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nvprogram: Silence "warning: unused parameter ‘ctx’"Ian Romanick2011-09-093-3/+3
|
* swrast: Silence many "warning: unused parameter ‘ctx’"Ian Romanick2011-09-091-0/+7
| | | | | Not all drivers use ctx in LOCAL_VARS, so '(void) ctx;' is added to all the function templates to make GCC happy.
* tnl_dd: Silence "tnl_dd/t_dd_tritmp.h:292:3: warning: suggest braces around ↵Ian Romanick2011-09-091-1/+2
| | | | empty body in an ‘if’ statement"