summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Convert _mesa_generate_mipmap to MapTexImage()-based access.Brian Paul2011-10-031-204/+1
| | | | | | | | | | | Now that we can zero-copy generate the mipmaps into brand new glTexImage()-generated storage using MapTextureImage(), we no longer need to allocate image->Data in mipmap generate. This requires deleting the drivers' old overrides of the miptree tracking after calling _mesa_generate_mipmap at the same time, or the drivers promptly lose our newly-generated data. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove unused field gl_program::VaryingIan Romanick2011-09-301-3/+0
| | | | | | | Lots of things set and copy this field around, but nothing uses it. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: add PIPE_CAP_TEXTURE_BARRIERMarek Olšák2011-09-301-1/+1
| | | | | | Same issue as with conditional_render. Reviewed-by: Brian Paul <[email protected]>
* gallium: add PIPE_CAP_CONDITIONAL_RENDERMarek Olšák2011-09-301-1/+1
| | | | | | | We were checking whether render_condition is set. That was not reliable, because it's always set with trace and noop regardless of driver support. Reviewed-by: Brian Paul <[email protected]>
* gallium: add and use PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERSMarek Olšák2011-09-301-2/+4
| | | | | | | | | This removes: - PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS - PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS in favor of the that new per-shader cap. Reviewed-by: Brian Paul <[email protected]>
* st/mesa: implement AllocTextureImageBuffer() driver hookBrian Paul2011-09-301-0/+86
| | | | | | | | This hasn't been needed so far since none of the core Mesa code paths that call ctx->Driver.AllocTextureImageBuffer() are used with the state tracker. That will change in upcoming patches. Note that this function duplicates some code seen in the st_TexImage() function. That can be cleaned up later.
* mesa: simplify parameters to GetTexImage() driver hookBrian Paul2011-09-301-10/+6
| | | | | | | The target, level and texObj can be obtained through the texImage parameter. We could make similar changes for the TexImage() hooks too. Reviewed-by: Eric Anholt <[email protected]>
* gallium: Set renderbuffer's InternalFormat when rendering to textureSimon Farnsworth2011-09-291-0/+1
| | | | | | | | | | | | | | When an FBO is rendering to a texture (rather than a renderbuffer), Gallium sets up an internal renderbuffer to handle the rendering, and copies over enough texture state to make this work. InternalFormat was missed out, causing glTexCopyImage to take a slow path unnecessarily. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41263 Signed-off-by: Simon Farnsworth <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: Remove ARB_texture_mirrored_repeat extension enable flagIan Romanick2011-09-291-4/+0
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64, mga, and savage (Savage3D and other pre-Savage4). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_blend_subtract extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on i810, mach64, mga, savage, sis, and tdfx (Voodoo Banshee and Voodoo3). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_stencil_wrap extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_lod_bias extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. This extension was previously not supported on mach64, mga, or r128. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_env_combine extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. It looks like the only hardware supported by Mesa that cannot do ARB_texture_env_combine is pre-NV10 NVIDA chips. It appears that these chips cannot do the GL_SUBTRACT mode. Based on looking at older copies of nvOpenGLspecs.pdf found on the net, NVIDIA never supported ARB_texture_env_combine on those chips either. This extension was previously not supported on mach64, mga (G200), r128, savage, sis, and tdfx (Voodoo Banshee and Voodoo3). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_texture_env_add extension enable flagIan Romanick2011-09-291-1/+0
| | | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_TEXTURE_ENV_MODE in OpenGL ES 2.x). This patch does not change the situation in any way. This extension was previously not supported on mach64, mga (G200), savage (Savage3D and other pre-Savage4), sis, and tdfx (Voodoo Banshee). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove ARB_multitexture extension enable flagIan Romanick2011-09-291-4/+0
| | | | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support is already partially broken in Mesa (e.g., querying GL_CLIENT_ACTIVE_TEXTURE in OpenGL ES 2.x). This patch does not change the situation in any way. This extension was previously not supported on i810, mga (G200), or tdfx (Voodoo Banshee). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: remove some old GetTexImage() codeBrian Paul2011-09-291-31/+5
| | | | | | | | We can use the core Mesa code for glGetTexImage() since it handles the image mapping/unmapping now. We'll keep the decompress_with_blit() path in the hope that it's faster than core Mesa's software decompression code. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41312
* st/mesa: don't compute index buffer bounds for per-instance dataMarek Olšák2011-09-291-3/+5
|
* st/mesa: include version.h and fix _mesa_override_glsl_version() callBrian Paul2011-09-281-1/+2
|
* mesa: Allow overriding GLSL version with environment variableChad Versace2011-09-281-0/+1
| | | | | | | | | | | | | | Override the context's GLSL version if the environment variable MESA_GLSL_VERSION_OVERRIDE is set. Valid values for MESA_GLSL_VERSION_OVERRIDE are integers, such as "130". MESA_GLSL_VERSION_OVERRIDE has the same behavior as INTEL_GLSL_VERSION, except that it applies to all drivers, not just Intel's. Since the former supercedes the latter, this patch disables the latter. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* st/mesa: substitute argument to guess_base_level_size() callBrian Paul2011-09-281-1/+1
| | | | | stObj->base.BaseLevel and firstImage->base.Level have the same value but the later looks more consistent in the function call.
* mesa: Finally, convert RGBA glGetTexImage() to using MapTextureImage().Brian Paul2011-09-271-38/+0
| | | | | | | v2: Changes by Brian to MapTexImage in the decompression path. v3: Changes by anholt to fix srcRowStride for decompression of NPOT. Tested-by: Brian Paul <[email protected]> (v2)
* mesa: Convert depth glGetTexImage() to using MapTextureImage().Brian Paul2011-09-271-1/+2
| | | | Tested-by: Brian Paul <[email protected]>
* mesa: Convert depth/stencil glGetTexImage() to using MapTextureImage().Brian Paul2011-09-271-3/+8
| | | | | | | Note that the implementation before and after appears to be broken in its handling of Z24_S8 vs S8_Z24. Tested-by: Brian Paul <[email protected]>
* mesa: Convert GetCompressedTexImage to using MapTextureImage().Brian Paul2011-09-271-39/+8
| | | | | | | This changes drivers to not map the texture on their own before calling _mesa_get_compressed_teximage(). Tested-by: Brian Paul <[email protected]>
* gallium: move border color to be a color unionDave Airlie2011-09-271-1/+1
| | | | | | | | | | EXT_texture_integer also specifies border color should be a color union, the values are used according to the texture sampler format. (update docs) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove EXT_bgra and EXT_texture_format_BGRA8888 extension enable flagsIan Romanick2011-09-261-2/+0
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. EXT_texture_format_BGRA8888 is mostly a subset of EXT_bgra. The only difference seems to be that EXT_texture_format_BGRA8888 allows GL_BGRA as an internal format to glTexImage2D and friends. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove many extension enable flagsIan Romanick2011-09-261-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The following extensions are always enabled, and drivers do not have to option to disable them: GL_ARB_multisample GL_ARB_texture_compression GL_ARB_vertex_buffer_object / GL_OES_mapbuffer GL_EXT_copy_texture GL_EXT_multi_draw_arrays / GL_SUN_multi_draw_arrays GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_edge_clamp / GL_SGIS_texture_edge_clamp GL_EXT_vertex_array GL_SGIS_generate_mipmap This set was picked because the are all either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support for some is already partially broken in Mesa (e.g., proxy texture targets in OpenGL ES). This patch does not change the situation in any way. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* st/mesa: remove unnecessary st_texture_match_image() parametersBrian Paul2011-09-223-11/+7
| | | | | We didn't use the face parameter and the level parameter can be found in the gl_texture_image.
* st/mesa: Finalize texture on render-to-texture.Michel Dänzer2011-09-221-3/+6
| | | | | | | | | | | | This makes sure that stObj->pt exists and is up to date. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39193 and piglit fbo-incomplete-texture-03. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Brian Paul <[email protected]> NOTE: This is a candidate for the 7.11 branch.
* st/mesa: Convert size assertions to conditionals in st_texture_image_copy.Brian Paul2011-09-221-3/+9
| | | | | | Prevents potential assertion failures in piglit fbo-incomplete-texture-03 test. NOTE: This is a candidate for the 7.11 branch.
* st/mesa: specify source mipmap level in decompress_with_blit()Brian Paul2011-09-201-0/+3
| | | | | This, along with the previous patch, fixes glGetTexImage() of compressed textures for level > 0.
* glsl_to_tgsi: implement ir_binop_all_equal and ir_binop_any_nequal for ↵Bryan Cain2011-09-201-34/+85
| | | | native integers
* st/mesa: Remove support for GL_EXT_blend_logic_opIan Romanick2011-09-192-10/+1
| | | | | | | | | | It was broken, and it isn't really useful anyway. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]>
* 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: add new DeleteTextureImage() driver hookBrian Paul2011-09-171-0/+10
| | | | | | 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 _mesa_update_fetch_functions() calls into swrastBrian Paul2011-09-171-5/+0
| | | | | | 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.
* st/mesa: rewrap a long lineBrian Paul2011-09-151-3/+4
|
* st/mesa: fix/update comment on st_translate_color()Brian Paul2011-09-141-2/+3
|
* mesa: introduce a clear color union to be used for int/unsigned buffersDave Airlie2011-09-142-8/+7
| | | | | | | | | | 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.
* 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]>
* glsl_to_tgsi: fix shadow2DArray comparisonMarek Olšák2011-09-101-3/+14
| | | | 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.
* st/mesa: init program MaxLocalParams, MaxEnvParams limitsBrian Paul2011-09-091-0/+6
| | | | Use the same limit for all parameter classes.
* st/mesa: Remove unused renderbuffer fields and functions.Stéphane Marchesin2011-09-072-28/+1
| | | | Reviewed-by: Brian Paul <[email protected]>
* st/mesa: remove unneeded #includeBrian Paul2011-09-061-1/+0
|
* mesa/st: add support for 2101010 vertex format conversion.Dave Airlie2011-09-062-1/+61
| | | | Signed-off-by: Dave Airlie <[email protected]>
* mesa: add a UniformBooleanTrue optionBryan Cain2011-09-051-0/+1
| | | | | | | | 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]>