aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast
Commit message (Collapse)AuthorAgeFilesLines
...
* mesa: Add decoding functions for GL_COMPRESSED_RG11_EACAnuj Phogat2012-12-071-1/+1
| | | | | | | | Data in GL_COMPRESSED_RG11_EAC format is decoded and stored in MESA_FORMAT_RG1616. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_R11_EACAnuj Phogat2012-12-071-1/+1
| | | | | | | | Data in GL_COMPRESSED_R11_EAC format is decoded and stored in MESA_FORMAT_R16. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EACAnuj Phogat2012-12-071-1/+1
| | | | | | | | Data in GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC format is decoded and stored in MESA_FORMAT_SARGB8. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_RGBA8_ETC2_EACAnuj Phogat2012-12-071-1/+1
| | | | | | | | Data in GL_COMPRESSED_RGBA8_ETC2_EAC format is decoded and stored in MESA_FORMAT_RGBA8888_REV. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_SRGB8_ETC2Anuj Phogat2012-12-071-1/+1
| | | | | | | | Data in GL_COMPRESSED_SRGB8_ETC2 format is decoded and stored in MESA_FORMAT_SARGB8. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add decoding functions for GL_COMPRESSED_RGB8_ETC2Anuj Phogat2012-12-071-1/+1
| | | | | | | | | Data in GL_COMPRESSED_RGB8_ETC2 format is decoded and stored in MESA_FORMAT_RGBX8888_REV. v2: Use CLAMP macro and stdbool.h Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add new MESA_FORMATs for ETC2 compressed texturesAnuj Phogat2012-12-071-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is required by OpenGL ES 3.0 to support ETC2 textures. This patch adds new MESA_FORMATs for following etc2 texture formats: GL_COMPRESSED_RGB8_ETC2 GL_COMPRESSED_SRGB8_ETC2 GL_COMPRESSED_RGBA8_ETC2_EAC GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC GL_COMPRESSED_R11_EAC GL_COMPRESSED_RG11_EAC GL_COMPRESSED_SIGNED_R11_EAC GL_COMPRESSED_SIGNED_RG11_EAC MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1 MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1 Above formats are currently available in only gles 3.0. v2: Add entries in texfetch_funcs[] array. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]> v3 (Paul Berry <[email protected]>): comment out symbols that are not implemented yet, so that this commit compiles on its own; future commits will uncomment the symbols as they become available.
* mesa: pass context parameter to gl_renderbuffer::Delete()Brian Paul2012-11-302-3/+3
| | | | | | | | | | We sometimes need a rendering context when deleting renderbuffers. Pass it explicitly instead of trying to grab a current context (which might be NULL). The next patch will make use of this. Note: this is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* Remove OpenVMS supportMatt Turner2012-11-161-82/+0
| | | | | | | | | | Not maintained since 2008. Doubtful that it's worked in quite a while. Also see commit 32ac8cb05 which removed VMS stuff from Makefile in 2009. Cc: Jouk Jansen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Andreas Boll <[email protected]>
* swrast: fix MSVC signed/unsigned warningsBrian Paul2012-11-061-2/+2
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* swrast: remove explicit size from texfetch_funcs arrayBrian Paul2012-10-311-1/+1
| | | | | | | | By removing the array size, the static assertion to check for missing elements can do its job properly. This will catch cases where a new Mesa format is added but the swrast texfetch code isn't updated. Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: Remove support for the NV_fragment_program extension.Kenneth Graunke2012-10-162-8/+1
| | | | | | | | No hardware drivers support this, it's obsolete, and unlikely to be useful without NV_vertex_program, which is gone now. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: remove unused ati_fs_opcodes arrayBrian Paul2012-09-151-15/+0
|
* mesa/ati_fragshader: no need for opcodes to be global.Dave Airlie2012-09-151-1/+1
| | | | | | | I can't see these in use anywhere outside this file. Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* Remove useless checks for NULL before freeingMatt Turner2012-09-054-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-058-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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) )
* mesa: remove SQRTF, use sqrtf. Convert INV_SQRT() to inline function.Brian Paul2012-09-033-5/+5
| | | | | | | We were already defining sqrtf where we don't have the C99 version. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: s/FREE/free/Brian Paul2012-09-011-5/+5
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: s/CALLOC/calloc/Brian Paul2012-09-012-2/+2
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: s/MALLOC/malloc/Brian Paul2012-09-012-2/+2
| | | | | | | v2: replace instances in dri/common/ dirs Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: fix-up and use _mesa_delete_renderbuffer()Brian Paul2012-08-311-1/+1
| | | | | | | | _mesa_delete_renderbuffer() should free the mutex (though that may be a no-op) and then free the renderbuffer object itself. Subclasses of gl_renderbuffer can use this function too. Reviewed-by: José Fonseca <[email protected]>
* swrast: fix wrong assignments in _swrast_add_spec_terms_line()Brian Paul2012-08-291-2/+2
|
* swrast: implement cubical depth texture samplingBrian Paul2012-08-241-41/+74
| | | | | | Fixes a few more failures in the piglit copyteximage test. Reviewed-by: Ian Romanick <[email protected]>
* mesa/swrast: fix GL_TEXTURE_2D_ARRAY texture fetches for dxt formatsBrian Paul2012-08-241-24/+24
| | | | | | | As with the previous commit. This fixes the last crash in the piglit copyteximage test but there's still some failures.
* mesa/swrast: fix GL_TEXTURE_2D_ARRAY texture fetches for latc/rgtc formatsBrian Paul2012-08-241-24/+24
| | | | | | | Fix-up the texel fetch functions so that they handle 3D coords (as used for array textures) and remove the "f_2d" part from their names. Helps fix swrast crashes in piglit's copyteximage test. More to come.
* mesa: new _mesa_num_tex_faces() helperBrian Paul2012-08-241-2/+3
| | | | | Not a real big help now, but will be useful for the GL_ARB_texture_cube_map_array extension in the future.
* mesa: Kill GL_ARB_shadow_ambient with fireIan Romanick2012-08-141-20/+16
| | | | | | | | | | No driver supports this extension, and it seems unlikely than any driver ever will. I think r300c may have supported it at one time, but that driver has already been removed. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Remove unnecessary parameters from AllocTextureImageBufferPauli Nieminen2012-08-122-29/+15
| | | | | | | | | | Size and format information is always stored in gl_texture_image structure. That makes it preferable to remove duplicate information from parameters to make interface easier to understand. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* swrast: Support sampler object for texture fetching statePauli Nieminen2012-08-0110-360/+446
| | | | | | | | | | | | swrast needs to pass sampler object into all texture fetching functions to use correct sampling state when sampler object is bound to the unit. The changes were made using half manual regular expression replace. v2: Fix NULL deref in _swrast_choose_triangle(), because the _Current values aren't set yet, so we need to look at our texObj2D. (anholt) Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Move DepthMode to texture objectPauli Nieminen2012-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | GL_DEPTH_TEXTURE_MODE isn't meant to be part of sampler state based on compatibility profile specifications. OpenGL specification 4.1 compatibility 20100725 3.9.2: "... The values accepted in the pname parameter are TEXTURE_WRAP_S, TEXTURE_WRAP_T, TEXTURE_WRAP_R, TEXTURE_MIN_- FILTER, TEXTURE_MAG_FILTER, TEXTURE_BORDER_COLOR, TEXTURE_MIN_- LOD, TEXTURE_MAX_LOD, TEXTURE_LOD_BIAS, TEXTURE_COMPARE_MODE, and TEXTURE_COMPARE_FUNC. Texture state listed in table 6.25 but not listed here and in the sampler state in table 6.26 is not part of the sampler state, and remains in the texture object." The list of states is in Table 6.24 "Textures (state per texture object)" instead of 6.25 mentioned in the specification text. Same can be found from 3.3 compatibility specification. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa formats: add MESA_FORMAT_ABGR2101010_UINTJordan Justen2012-07-211-1/+7
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Fix memory leaks in blit_linear.Vinson Lee2012-04-021-0/+9
| | | | | | | | | Fixes Coverity resource leak defects. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: rework texture completeness testingBrian Paul2012-03-203-4/+10
| | | | | | | | | | | | | | | | | | | Instead of gl_texture_object::_Complete there are now two fields: _BaseComplete and _MipmapComplete. The former indicates whether the base texture level is valid. The later indicates whether the whole mipmap is valid. With sampler objects, a single texture can appear to be both complete and incomplete at the same time. See the GL_ARB_sampler_objects spec for more details. To implement this we now check if the texture is complete with respect to a sampler state. Another benefit of this is we no longer need to invalidate a texture's completeness state when we change the minification/magnification filters with glTexParameter(). Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: s/_DD_NEW_SEPARATE_SPECULAR/_MESA_NEW_SEPARATE_SPECULAR/Brian Paul2012-03-121-3/+3
| | | | | | | Another step toward removing the _DD_NEW_x flags Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: move more swrast-related #defines out of core MesaBrian Paul2012-02-242-0/+28
|
* mesa: remove MAX_WIDTH from prog_execute.hBrian Paul2012-02-241-0/+2
| | | | | define a PROG_MAX_WIDTH var instead. It has to match MAX_WIDTH in swrast. More elaborate refactoring could fix that (someday).
* swrast: check max renderbuffer size against SWRAST_MAX_WIDTHBrian Paul2012-02-241-0/+2
|
* swrast: define, use SWRAST_MAX_WIDTH/HEIGHTBrian Paul2012-02-2416-46/+55
| | | | We'll get rid of MAX_WIDTH, MAX_HEIGHT soon.
* swrast: remove MAX_WIDTH array in s_span.cBrian Paul2012-02-241-1/+2
|
* swrast: simplify mask array codeBrian Paul2012-02-241-3/+4
|
* swrast: stop using MAX_WIDTH arrays in triangle codeBrian Paul2012-02-241-2/+2
|
* swrast: remove MAX_WIDTH arrays in stencil codeBrian Paul2012-02-243-4/+37
| | | | Use some per-context temporary arrays instead.
* swrast: remove MAX_WIDTH arrays in s_drawpix.cBrian Paul2012-02-241-27/+36
|
* swrast: remove MAX_WIDTH arrays in s_zoom.cBrian Paul2012-02-241-2/+14
|
* swrast: remove MAX_WIDTH arrays in s_depth.cBrian Paul2012-02-241-1/+9
|
* swrast: remove MAX_WIDTH arrays in s_copypix.cBrian Paul2012-02-241-5/+20
|
* mesa: move/fix MAX_WIDTH/HEIGHT-related assertionsBrian Paul2012-02-241-0/+8
| | | | | | Max texture and viewport size is only limited by MAX_WIDTH/HEIGHT for swrast. Reviewed-by: José Fonseca <[email protected]>
* i915: Initialize swrast_texture_image structure fields.Paul Berry2012-02-222-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 980f6f1 (mesa: move gl_texture_image::Width/Height/DepthScale fields to swrast) moved the initialization of the Width, Height, and DepthScale fields to _swrast_alloc_texture_image_buffer(). However, i915 doesn't call this function because it performs its own buffer allocation. As a result, the Width, Height, and DepthScale fields weren't getting initialized properly, and some operations requiring swrast would fail. This patch ensures that Width, Height, and DepthScale are properly initialized by separating the code that sets them into a new function, _swrast_init_texture_image(), which is called by intel_alloc_texture_image_buffer() as well as _swrast_alloc_texture_image_buffer(). It also moves the initialization of _IsPowerOfTwo into this function. Fixes piglit test fbo/fbo-cubemap on i915. Partially fixes https://bugs.freedesktop.org/show_bug.cgi?id=41216 This is a candidate for the 8.0 branch. Reviewed-and-tested-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swrast: Only avoid empty _TexEnvProgramsIan Romanick2012-02-151-1/+2
| | | | | | | | | | | | | | If the generated shader for _TexEnvProgram is empty, force the use of the fixed-function code. Otherwise, go ahead and use the shader. This works around a mysterious issue on i915 where fixed-function software fallbacks are not working correctly. This isn't really the fix we want, but it works around the issue. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45872 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45876
* swrast: fix span color type selectionBrian Paul2012-02-123-9/+36
| | | | | | | | | | | | | | | | Fixes a regression from commit 660ed923ded3552e023ef8c3dd9f92e6792f1bd2. The basic idea is to look at the format of the dest renderbuffer and choose either GLubyte or GLfloat for colors. The previous code used _mesa_format_to_type_and_comps() which could return a bunch types other than ubyte/float. Determine the datatype at renderbuffer mapping time to avoid frequent calls to the format query functions. NOTE: This is a candidate for the 8.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45578 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45577