aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove NV_texgen_reflection extension enable flagMarek Olšák2012-10-311-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: don't always enable OES_standard_derivativesMarek Olšák2012-10-311-0/+2
| | | | | | | | For Intel, expose it only if gen >= 4. For Gallium, expose it only if PIPE_CAP_SM3 is advertised. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove ARB_window_pos extension enable flagMarek Olšák2012-10-311-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove ARB_copy_buffer extension enable flagMarek Olšák2012-10-311-1/+0
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallium: expose ARB_map_buffer_alignment on RadeonMarek Olšák2012-10-311-0/+6
| | | | | | | | Reviewed-by: Brian Paul <[email protected]> v2: update relnotes-9.1 v3: use align_malloc and align_free for malloced buffers in r300g v4: document the new CAP in the docs
* st/mesa: don't use _NEW_PROGRAM where ST_NEW_xxx_PROGRAM is sufficientMarek Olšák2012-10-313-6/+6
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: add start_slot parameter to set_vertex_buffersMarek Olšák2012-10-318-15/+32
| | | | | | | | | | | | | | | | | | | | | This allows updating only a subrange of buffer bindings. set_vertex_buffers(pipe, start_slot, count, NULL) unbinds buffers in that range. Binding NULL resources unbinds buffers too (both buffer and user_buffer must be NULL). The meta ops are adapted to only save, change, and restore the single slot they use. The cso_context can save and restore only one vertex buffer slot. The clients can query which one it is using cso_get_aux_vertex_buffer_slot. It's currently set to 0. (the Draw module breaks if it's set to non-zero) It should decrease the CPU overhead when using a lot of meta ops, but the drivers must be able to treat each vertex buffer slot as a separate state (only r600g does so at the moment). I can imagine this also being useful for optimizing some OpenGL use cases. Reviewed-by: Brian Paul <[email protected]>
* glsl_to_tgsi: set correct register type for array and structure elementsBryan Cain2012-10-291-2/+19
| | | | | | | | | | | | | | This fixes an issue where glsl_to_tgsi_visior::get_opcode() would emit the wrong opcode because the register type was GLSL_TYPE_ARRAY/STRUCT instead of GLSL_TYPE_FLOAT/INT/UINT/BOOL, so the function would use the float opcodes for operations on integer or boolean values dereferenced from an array or structure. Assertions have been added to get_opcode() to prevent this bug from reappearing in the future. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> Tested-by: Andreas Boll <[email protected]>
* Revert "glsl_to_tgsi: set correct register type for array and structure ↵Andreas Boll2012-10-291-19/+2
| | | | | | | | elements" This reverts commit ebd8df7a3152e34805e2863c8471ee1a2de38fe1. accidentally pushed.
* mesa/st: Don't use 4bits for GL_UNSIGNED_BYTE_3_3_2(_REV)José Fonseca2012-10-251-0/+2
| | | | | | | | | | | | 4bits and 3bits quantitization values differ significantly for values other than 0 and 1. Fixes piglit draw-pixels for softpipe/llvmpipe. NOTE: Probably a candidate for stable branches. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* glsl_to_tgsi: set correct register type for array and structure elementsBryan Cain2012-10-241-2/+19
| | | | | | | | | This fixes an issue where glsl_to_tgsi_visior::get_opcode() would emit the wrong opcode because the register type was GLSL_TYPE_ARRAY/STRUCT instead of GLSL_TYPE_FLOAT/INT/UINT/BOOL, so the function would use the float opcodes for operations on integer or boolean values dereferenced from an array or structure. Assertions have been added to get_opcode() to prevent this bug from reappearing in the future.
* st/mesa: Fix assertions for copying texture image to finalized miptree.Michel Dänzer2012-10-241-1/+4
| | | | | | | | | | | | | | | | | The layer dimension of array textures is not subject to mipmap minification. OTOH we were missing an assertion for the depth dimension. Fixes assertion failures with piglit {f,v}s-textureSize-sampler1DArrayShadow. For some reason, they only resulted in piglit 'warn' results for me, not failures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56211 NOTE: This is a candidate for the stable branches. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Andreas Boll <[email protected]>
* st/mesa: free TGSI tokens with ureg_free_tokens()Brian Paul2012-10-221-1/+1
| | | | | | since they're allocated by ureg_get_tokens(). NOTE: This is a candidate for the 8.0 and 9.0 branches.
* st/mesa: replace REALLOC() with realloc()Brian Paul2012-10-221-8/+2
| | | | | | | | | We should use the later since we're freeing the memory with free(), not the gallium FREE() macro. This fixes a mismatch when using the gallium debug memory functions. NOTE: This is a candidate for the 9.0 branch.
* st/mesa: Fix source miptree level for copying data to finalized miptree.Michel Dänzer2012-10-191-1/+5
| | | | | | | | | | | | Fixes WebGL texture mips conformance test, no piglit regressions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44912 NOTE: This is a candidate for the stable branches. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Andreas Boll <[email protected]>
* st/mesa: improve the guess_and_alloc_texture() heuristicBrian Paul2012-10-181-0/+2
| | | | | | | | If GL_BASE_LEVEL==0 and GL_MAX_LEVEL==0 that's a pretty good hint that there'll be a single mipmap level in the texture. Google Earth sets the texture's state this way before the first glTexImage call. This saves a bit of texture memory.
* st/mesa: silence MSVC signed/unsigned comparison warningBrian Paul2012-10-171-1/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* st/mesa: silence MSVC double/unsigned assignment warningBrian Paul2012-10-171-1/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Remove remnants of PROGRAM_VARYING.Kenneth Graunke2012-10-161-2/+0
| | | | | | | | The previous patch removed the producer of things in this file. Since there aren't any, we can remove it. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: Remove the PROG_PARAM_BIT_CYL_WRAP flag. [v2]Kenneth Graunke2012-10-161-13/+4
| | | | | | | | | Nobody ever set the flag, which makes this dead code. v2: Leave the ureg_DECL_fs_input_cyl function in place, even though it's unused, since VMWare uses it for their internal projects. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove support for named parameters.Kenneth Graunke2012-10-162-8/+0
| | | | | | | | | | | These were only part of NV_fragment_program, so we can kill them. The fact that PROGRAM_NAMED_PARAM appears in r200_vertprog.c is rather comedic, but also demonstrates that people just spam the various types of parameters everywhere because they're confusing. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove yet more remnants of NV_fragment_program.Kenneth Graunke2012-10-161-2/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/mesa: remove OPCODE_BRA switch caseBrian Paul2012-10-151-2/+0
|
* gallium: Remove #if 0-ed enable of NV_vp. It's going away.Eric Anholt2012-10-151-5/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fix integer texture border color for some formats (v2)Marek Olšák2012-10-154-48/+112
| | | | | | | | | | | | And the clear color too, though that may be an issue only with GL_RGB if it's actually RGBA in the driver. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]> v2: The types of st_translate_color parameters were changed to gl_color_union and pipe_color_union as per Brian's comment.
* mesa/st: Fix assertions.José Fonseca2012-10-121-2/+2
| | | | Can't access ptDraw before it is written.
* gallium: unify transfer functionsMarek Olšák2012-10-117-100/+80
| | | | | | | | | | | | | | "get_transfer + transfer_map" becomes "transfer_map". "transfer_unmap + transfer_destroy" becomes "transfer_unmap". transfer_map must create and return the transfer object and transfer_unmap must destroy it. transfer_map is successful if the returned buffer pointer is not NULL. If transfer_map fails, the pointer to the transfer object remains unchanged (i.e. doesn't have to be NULL). Acked-by: Brian Paul <[email protected]>
* st/mesa: use the renderbuffer chosen by core Mesa in CopyTexSubImageMarek Olšák2012-10-111-12/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: use transfer_inline_write in st_texture_image_dataMarek Olšák2012-10-111-46/+8
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: remove useless checking in reset_cacheMarek Olšák2012-10-111-6/+0
| | | | | | It's always NULL here. Reviewed-by: Brian Paul <[email protected]>
* Revert "st/mesa: remove unused variables to fix compile warnings"Brian Paul2012-10-081-0/+2
| | | | | | | This reverts commit 810d2e167c5a507084d1865a260809b847ca3201. The pscreen variable is used in an assertion. Use "(void) pscreen;" to silence the warning.
* st/mesa: remove unused variables to fix compile warningsMarek Olšák2012-10-091-1/+0
|
* mesa: remove the driverCtx parameter to _mesa_create/initialize_context()Brian Paul2012-10-051-1/+1
| | | | No longer used.
* st/mesa: implement decompress_with_blit using gallium blitMarek Olšák2012-09-301-47/+23
| | | | | Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: implement BlitFramebuffer using gallium blitMarek Olšák2012-09-301-179/+147
| | | | | | | | This also fixes a lot tests, especially all the clip-and-scissor-blit MSAA piglit tests. Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: check for zero-size image in st_TestProxyTexImage()Brian Paul2012-09-241-0/+5
| | | | | | Fixes divide by zero issue in llvmpipe driver. Reviewed-by: José Fonseca <[email protected]>
* st/mesa: implement new proxy texture codeBrian Paul2012-09-172-1/+73
| | | | | | | If the gallium driver implements the can_create_resource() function, call it to do proxy texture size checks. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove FEATURE_EXT_transform_feedback define.Oliver McFadden2012-09-152-20/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_EXT_texture_sRGB define.Oliver McFadden2012-09-151-4/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_EXT_framebuffer_blit define.Oliver McFadden2012-09-152-14/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_OES_EGL_image define.Oliver McFadden2012-09-153-17/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_EXT_framebuffer_object define.Oliver McFadden2012-09-151-2/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_OES_draw_texture define.Oliver McFadden2012-09-153-24/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_texture_s3tc define.Oliver McFadden2012-09-151-9/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_rastpos define.Oliver McFadden2012-09-152-14/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_queryobj define.Oliver McFadden2012-09-152-14/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_feedback define.Oliver McFadden2012-09-155-25/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove FEATURE_drawpix define.Oliver McFadden2012-09-155-55/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2012-09-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + free (E); + E = NULL; - if (unlikely (E != NULL)) { - free(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + free ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - free((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + free (E); - if (unlikely (E != NULL)) { - free (E); - } @@ expression E; type T; @@ + free ((T) E); - if (unlikely (E != NULL)) { - free ((T) E); - } Reviewed-by: Brian Paul <[email protected]>
* Don't cast the return value of malloc/reallocMatt Turner2012-09-052-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has been generated by the following Coccinelle semantic patch: // Don't cast the return value of malloc/realloc. // // Casting the return value of malloc/realloc only stands to hide // errors. @@ type T; expression E1, E2; @@ - (T) ( _mesa_align_calloc(E1, E2) | _mesa_align_malloc(E1, E2) | calloc(E1, E2) | malloc(E1) | realloc(E1, E2) )