summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* mesa: Remove GL_COLOR_INDEX from _mesa_{dest,source}_buffer_existsIan Romanick2011-09-061-2/+0
| | | | | | | Mesa hasn't supported color-index rendering for a long time. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove GL_COLOR_INDEX from base format assertionsIan Romanick2011-09-061-2/+0
| | | | | | | | _mesa_make_temp_float_image can't work on color-index textures, but there is no such thing as a color-index texture anymore. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unused struct gl_color_tableIan Romanick2011-09-062-20/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unused functions _mesa_lookup_rgba_{float,ubyte}Ian Romanick2011-09-062-270/+0
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove all mention of GL_COLOR_INDEX*_EXTIan Romanick2011-09-063-36/+2
| | | | | | | | These enums were only valid with the paletted texture extensions. This allows a couple other trivial clean-ups. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove dd_function_table::CopyColorTable, ::CopyColorSubTable, and ↵Ian Romanick2011-09-061-23/+0
| | | | | | | | | | ::UpdateTexturePalette There's nothing left that can call any of these functions. This also removes the meta-ops code that implemented the first two. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove API facing bits of EXT_paletted_texture and ↵Ian Romanick2011-09-0613-817/+27
| | | | | | | | | | | | | | EXT_shared_texture_palette This was also discussed at XDS 2010. However, actually making the change was delayed because several drivers still exposed these extensions to significant benefit (e.g., tdfx). Now that those drivers have been removed, this code can be removed as well. v2: A lot of bits that were missed in the previous patch have been removed. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Refactor code that converts between gl_vert_result and gl_frag_attrib.Paul Berry2011-09-061-2/+43
| | | | | | | | | | | | Previously, this conversion was duplicated in several places in the i965 driver. This patch moves it to a common location in mtypes.h, near the declaration of gl_vert_result and gl_frag_attrib. I've also added comments to remind us that we may need to revisit the conversion code when adding elements to gl_vert_result and gl_frag_attrib. Reviewed-by: Eric Anholt <[email protected]>
* mesa/varray: add interface support for ARB_vertex_type_2_10_10_10_rev (v2)Dave Airlie2011-09-061-7/+38
| | | | | | | | | | | This just adds all the API check for vertex arrays using 2101010 types. 2101010 is also useable with GL_BGRA. v2: fix whitespace. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: add initial API changes for ARB_vertex_type_2_10_10_10_rev.Dave Airlie2011-09-062-0/+111
| | | | | | | add new APIs to the internal mesa driver interface + set funcs in vtxfmt.c Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glapi: regen API files for new extensionDave Airlie2011-09-063-5298/+6030
| | | | Signed-off-by: Dave Airlie <[email protected]>
* mesa: add a UniformBooleanTrue optionBryan Cain2011-09-052-1/+10
| | | | | | | | Drivers supporting native integers set UniformBooleanTrue to the integer value that should be used for true when uploading uniform booleans. This is ~0 for Gallium and 1 for i965. Reviewed-by: Ian Romanick <[email protected]>
* mesa: handle zero-size buffers in MapBuffer and ranges in MapBufferRange (v3)Marek Olšák2011-09-021-1/+23
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: fix broken store_texel() functionsBrian Paul2011-08-312-39/+64
| | | | | | This fixes the swrast failures for piglit's fbo-generatemipmap-formats test (for uncompressed formats). At some point down the road this code will go away so I haven't checked all the other store_texel() functions.
* mesa: Replace the EmitNoIfs compiler flag with a MaxIfDepth flag.Bryan Cain2011-08-311-5/+1
| | | | | | | This is a better, more fine-grained way of lowering if statements. Fixes the game And Yet It Moves on nv50. Reviewed-by: Ian Romanick <[email protected]>
* mesa: fix comment typo: s/GL_SIGNED_NORMALED/GL_SIGNED_NORMALIZED/Brian Paul2011-08-311-1/+1
|
* mesa: bump max program local params, max uniforms limitBrian Paul2011-08-311-2/+2
| | | | | | Some driver support more than 1024. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix glGetUniform() type conversions.Eric Anholt2011-08-301-58/+79
| | | | | | | | | | | | | | | | | | | | | We were primarily failing to convert in the NativeIntegers case, which this fixes. However, we were also just truncating float uniforms when converting to integer, which does not appear to be the correct behavior. Note, however, that the NVIDIA drivers also truncate instead of rounding. GL_DOUBLE return type is dropped because it was never used and completely broken. It can be added when there's test code. Fixes piglit ARB_shader_objects/getuniform v2: This is a rewrite of my previous glGetUniform patch, which Ken pointed out missed storage_type-based conversions to integer, which was totally broken still thanks to a typo in the testcase. v3: Quote the spec justifying the rounding behavior. Acked-by: Kenneth Graunke <[email protected]> Acked-by: Ian Romanick <[email protected]>
* mesa: update multisample state on _NEW_BUFFERSChristoph Bumiller2011-08-301-1/+1
| | | | A change in sampleBuffers affects the final enable value.
* mesa: Remove all mention of MESA_FORMAT_CI8Ian Romanick2011-08-298-156/+5
| | | | | | | | | | | Nothing in Mesa supports color-index textures, and most of the other infrastructure that could allow such support has already been removed. This puts the final nail in the coffin. Also clean out some GL_COLOR_INDEX comments in formats.c. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Convert texture debug dump function to using MapTextureImage().Brian Paul2011-08-292-44/+52
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Convert texstore.c to accessing textures using MapTextureImage.Brian Paul2011-08-291-107/+231
| | | | | | | This continues to allocate texImage->Data as before, so drivers calling these functions need to use that when present. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add driver hooks for texture image mapping/unmapping.Brian Paul2011-08-291-0/+19
| | | | | | | | | ctx->Driver.MapTextureImage() / UnmapTextureImage() will be called by the glTex[Sub]Image(), glGetTexImage() functions, etc. when we're accessing texture data, and also for software rendering when accessing texture data. Reviewed-by: Brian Paul <[email protected]>
* mesa: Don't check for image->Data when freeing an image's contents.Eric Anholt2011-08-292-10/+4
| | | | | | | | | | | | | | | | | | | | | All driver implementations of FreeTextureImageBuffer already check that Data != NULL and free it. However, this means that we will also free driver storage if the driver storage wasn't in the form of a Data pointer. This was produced by the following semantic patch: @@ expression C; expression T; @@ - if (T->Data) { - C->Driver.FreeTextureImageBuffer(C, T); + C->Driver.FreeTextureImageBuffer(C, T); - } Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Rename FreeTexImageData to FreeTextureImageBuffer.Eric Anholt2011-08-294-11/+11
| | | | | | | | This was produced by sed, except for one hunk in driverfuncs.c where trailing whitespace was dropped. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mapi: Commit generated files modified by previous commitIan Romanick2011-08-262-3638/+3643
| | | | | Some of the changes are spurious because somebody forgot to do this when adding glFramebufferTextureLayerARB.