summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: clean up validate_texture_wrap_modeChia-I Wu2011-11-031-15/+27
| | | | | | | | GL_TEXTURE_RECTANGLE_NV (and soon GL_TEXTURE_EXTERNAL_OES) is special. Handle it in its own if-block. There should be no functional change. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: fix a logic error in glFramebufferTexture2DChia-I Wu2011-11-031-1/+1
| | | | | | | Unrecognized texture target should give an error. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: add GL_OES_EGL_image_external to the extension listChia-I Wu2011-11-032-0/+2
| | | | | Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa: add missing defines for GL_OES_EGL_image_externalChia-I Wu2011-11-031-0/+8
| | | | | Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* mesa, i965: prepare for more than 8 texture targetsChia-I Wu2011-11-031-1/+1
| | | | | | | | | 3-bit fields are used store texture target in several places. That will fail when TEXTURE_EXTERNAL_INDEX, which happends to be the 9th texture target, is added. Make them 4-bit fields. Reviewed-by: Brian Paul <[email protected]> Acked-by: Jakob Bornecrantz <[email protected]>
* glapi: regenerate filesChia-I Wu2011-11-031-1178/+1190
|
* mesa: fix the low limit of width and height for glRenderbufferStorageYuanhan Liu2011-11-031-2/+2
| | | | | | | | | | | | glRenderbufferStorage man page says: GL_INVALID_VALUE is generated if either of width or height is negative, or greater than the value of GL_MAX_RENDERBUFFER_SIZE. NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: fix inital value for new renderbufferYuanhan Liu2011-11-031-1/+1
| | | | | | | | | | | | | EXT_framebuffer_object bspec says: Get Value Type Get Command Initial Value ------------------------------- ------ ----------- ----------- RENDERBUFFER_INTERNAL_FORMAT_EXT Z+ GetRenderbufferParameterivEXT RGBA NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: complete the GL_TEXTURE_SWIZZLE* setupYuanhan Liu2011-11-031-0/+27
| | | | | | | | | | | | | | | | | | | | | The ARB_texture_swizzle spec says: The error INVALID_OPERATION is generated if TexParameteri, TexParameterf, TexParameteriv, or TexParameterfv, parameter <pname> is TEXTURE_SWIZZLE_R, TEXTURE_SWIZZLE_G, TEXTURE_SWIZZLE_B, or TEXTURE_SWIZZLE_A, and <param> is not RED, GREEN, BLUE, ALPHA, ZERO, or ONE. The error INVALID_OPERATION is generated if TexParameteriv, or TexParameterfv, parameter <pname> TEXTURE_SWIZZLE_RGBA, and the four consecutive values pointed to by <param> are not all RED, GREEN, BLUE, ALPHA, ZERO, or ONE. So, the GL_TEXTURE_SWIZZLE* pname is legal for glTexParameterf(v) NOTE: this is a candidate for the 7.11 branch Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove the redundant checkYuanhan Liu2011-11-031-6/+5
| | | | | Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Set the "Integer" field of gl_client_array properly.Paul Berry2011-11-022-0/+2
| | | | | | | | | | | This patch ensures that gl_client_array::Integer is properly set to GL_TRUE for vertex attributes specified using glVertexAttribIPointer, and to GL_FALSE for vertex attributes specified using glVertexAttribPointer, so that the vertex attributes can be interpreted properly by driver back-ends. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Make unpack_uint_z_row return 32 bits of data.Eric Anholt2011-11-011-25/+10
| | | | | | | | | Some of the return values were u32, some were 24 bits, and z16 returned 16 bits. The caller would have to do all the work of interpreting the format all over again. However, there are no callers of this function at this point. Reviewed-by: Brian Paul <[email protected]>
* Add MapRenderbuffer implementations for software drivers.Eric Anholt2011-11-012-0/+39
| | | | | | | | | | Mesa core's is generic for things like osmesa. For swrast_dri.so, we have to do Y flipping. The front-buffer path isn't actually tested, though, because both before and after it fails with a BadMatch in XGetImage. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add a driver hook for mapping renderbuffers.Eric Anholt2011-11-011-0/+9
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: make save_EndConditionalRender param list (void) to silence warningBrian Paul2011-11-011-1/+1
|
* mesa: Fix memory leak in out-of-memory path.Vinson Lee2011-11-011-0/+1
| | | | Fixes Coverity resource leak defect.
* mesa: Add NV_fog_distance to the fixed-function vertex program generatorNicholas Miell2011-11-011-4/+39
| | | | | This is all that is needed to implement NV_fog_distance on programmable hardware.
* mesa: Add the basics for the NV_fog_distance extensionNicholas Miell2011-11-014-0/+22
| | | | No driver implements it yet.
* mesa: add note about immutable textures for _mesa_test_texobj_completeness()Brian Paul2011-10-311-0/+4
|
* swrast: implement GL_ARB_texture_storageBrian Paul2011-10-311-0/+1
|
* mesa: plug in dispatch functions for GL_ARB_texture_storageBrian Paul2011-10-311-0/+9
|
* mesa: init extension entry for GL_ARB_texture_storageBrian Paul2011-10-311-0/+1
|
* mesa: display list dispatch for GL_ARB_texture_storageBrian Paul2011-10-311-0/+9
|
* mesa: new glTexImage error checks for GL_ARB_texture_storageBrian Paul2011-10-311-0/+34
| | | | | If the texture memory was allocated with glTexStorage1/2/3D() we can only change the image data with glTexSubImage calls.
* mesa: glGetTexParameter support for GL_ARB_texture_storageBrian Paul2011-10-311-0/+12
|
* mesa: implement new functions for GL_ARB_texture_storageBrian Paul2011-10-312-0/+463
| | | | | This is the glTexStorage1D/2D/3D() functions. Basically do error checking then call the driver hook to actually allocate memory.
* glapi: regenerated API files for GL_ARB_texture_storageBrian Paul2011-10-313-5079/+5196
|
* mesa: add new driver hook for AllocTextureStorage()Brian Paul2011-10-311-0/+9
|
* mesa: add new fields for GL_ARB_texture_storageBrian Paul2011-10-311-0/+2
|
* mesa: Don't do [0, 1] clamping on glGetTexImage() of packed float formats.Eric Anholt2011-10-281-4/+6
| | | | | | | | | | | | | | | | | | | | From the GL_EXT_packed_float spec: For an RGBA color, if <type> is not one of FLOAT, UNSIGNED_INT_5_9_9_9_REV_EXT, or UNSIGNED_INT_10F_11F_11F_REV_EXT, or if the CLAMP_READ_COLOR_ARB is TRUE, or CLAMP_READ_COLOR_ARB is FIXED_ONLY_ARB and the selected color (or texture) buffer is a fixed-point buffer, each component is first clamped to [0,1]. Then the appropriate conversion formula from table 4.7 is applied the component." (but we previously resolved that the CLAMP_READ_COLOR bit is not relevant to glGetTexImage()) This fixes most of the cases in piglit GL_EXT_packed_float/pack. Reviewed-by: Marek Ol ák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Distinguish between no interpolation qualifier and 'smooth'Paul Berry2011-10-271-1/+5
| | | | | | | | | | | | | | | Previously, we treated the 'smooth' qualifier as equivalent to no qualifier at all. However, this is incorrect for the built-in color variables (gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor, and gl_BackSecondaryColor). For those variables, if there is no qualifier at all, interpolation should be flat if the shade model is GL_FLAT, and smooth if the shade model is GL_SMOOTH. To make this possible, I added a new value to the glsl_interp_qualifier enum, INTERP_QUALIFIER_NONE. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Expose GLSL interpolation qualifiers in gl_fragment_program.Paul Berry2011-10-271-0/+19
| | | | | | | | | | | | | | | | | This patch makes GLSL interpolation qualifiers visible to drivers via the array InterpQualifier[] in gl_fragment_program, so that they can easily be used by driver back-ends to select the correct interpolation mode. Previous to this patch, the GLSL compiler was using the enum ir_variable_interpolation to represent interpolation types. Rather than make a duplicate enum in core mesa to represent the same thing, I moved the enum into mtypes.h and renamed it to be more consistent with the other enums defined there. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: initialize ARB_transform_feedback2 dispatchMarek Olšák2011-10-272-1/+10
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: improve EXT_transform_feedback display list supportMarek Olšák2011-10-271-10/+9
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: fix GL error checking in TransformFeedbackVaryingsMarek Olšák2011-10-271-1/+3
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Rename remaining internal builtins from gl_MESA* to gl_*MESA.Eric Anholt2011-10-261-3/+3
| | | | | | This matches the usual convention for extension builtin variables. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Apply StripTextureBorder to CopyTexImage as well.Eric Anholt2011-10-261-0/+10
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Fold gallium's texture border stripping into a core Mesa option.Eric Anholt2011-10-262-3/+68
| | | | | | | | | We wanted to reuse this in the Intel driver. v2: Move the flag to ctx->Const Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Brian Paul <[email protected]>
* mesa: Skip texstore for 0-sized texture data.Eric Anholt2011-10-261-0/+9
| | | | | | | | | | | The intel driver (and gallium, it looks like, though it doesn't use these texstore functions at this point) doesn't bother making storage for textures with 0 width, height, or depth. This avoids them having to deal with returning a mapping for that nonexistent data. Fixes assertion failures with an upcoming intel driver change. Reviewed-by: Brian Paul <[email protected]>
* glsl: Add uniform_locations_assigned parameter to do_dead_code opt passIan Romanick2011-10-251-1/+1
| | | | | | | | | | | | | | | | | Setting this flag prevents declarations of uniforms from being removed from the IR. Since the IR is directly used by several API functions that query uniforms in shaders, uniform declarations cannot be removed after the locations have been set. However, it should still be safe to reorder the declarations (this is not tested). Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980 Tested-by: Brian Paul <[email protected]> Reviewed-by: Bryan Cain <[email protected]> Cc: Vinson Lee <[email protected]> Cc: José Fonseca <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: Remove unnecessary and incorrect TexEnv parameter validation.Kenneth Graunke2011-10-251-6/+0
| | | | | | | | | | | | | | | | | For GL_RGB_SCALE and GL_ALPHA_SCALE targets, the API wrapper code attempts to ensure the parameter is 1.0, 2.0, or 4.0. This is unnecessary: set_combiner_scale in texenv.c (called by _mesa_TexEnvfv) already checks this and raises an appropriate error. It's also incorrect: For glTexEnvx, the API validation code directly compares the GLfixed input parameter with a floating point constant, prior to converting fixed-point to floating point. Fixes an issue in the OpenGL ES 1.1 conformance suite. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: fix comment languageBrian Paul2011-10-251-2/+2
|
* mesa: Fix memory leak in out-of-memory path.Vinson Lee2011-10-241-0/+1
| | | | | | Fixes Coverity resource leak defect. Reviewed-by: Brian Paul <[email protected]>
* Only use gcc visibility support with gcc4+.Tom Fogal2011-10-241-1/+1
| | | | | | | | | I had a colleague hitting issues compiling with an old gcc3.2 system. These patches got them through. NOTE: This is a candidate for the 7.11 branch. Reviewed-by: Brian Paul <[email protected]>
* mesa: Avoid ABA problem on buffer object bind.Mathias Fröhlich2011-10-242-1/+13
| | | | | | | | | | | | | | Make sure we do not run into the classic ABA problem on buffer object bind, reusing this name and may be never rebind since we get an new name that was just deleted and never rebound in between. The explicit rebinding to the debault object in the current context prevents the above in the current context, but another context sharing the same objects might suffer from this problem. Minor var renaming and comments edited by Brian. Signed-off-by: Mathias Fröhlich <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: remove dead code from teximage.cBrian Paul2011-10-231-29/+0
|
* mesa: Fix multithreaded buffer object refcounting.Mathias Fröhlich2011-10-231-72/+151
| | | | | | | | | | Buffer objects may be shared across contexts. Rework the array attrib push/pop implementation to be thread safe. Make use of more library functions for this purpose. Signed-off-by: Mathias Fröhlich <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: remove _mesa_alloc_texmemory(), _mesa_free_texmemory()Brian Paul2011-10-232-57/+0
| | | | Core Mesa no longer does any texture memory allocation.
* mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrastBrian Paul2011-10-237-38/+32
| | | | | | Only swrast and the drivers that fall back to swrast need these fields now. This removes the last of the fields related to software rendering from gl_texture_image.
* mesa: improve the warning message in _mesa_choose_tex_format()Brian Paul2011-10-231-1/+3
| | | | Bug 42128 hits this _mesa_warning() call.