summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa/es: Remove redundant light pname and light validationIan Romanick2012-08-202-108/+2
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant hint mode validationIan Romanick2012-08-201-6/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant separate stencil face validationIan Romanick2012-08-201-12/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant stencil function validationIan Romanick2012-08-201-22/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant logic op operand validationIan Romanick2012-08-201-19/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant alpha function validationIan Romanick2012-08-202-26/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant separate stencil mask face validationIan Romanick2012-08-201-6/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant front-face mode validationIan Romanick2012-08-201-5/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant face culling mode validationIan Romanick2012-08-201-6/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant blend equation mode validationIan Romanick2012-08-201-36/+0
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant texture target validationIan Romanick2012-08-202-63/+0
| | | | | | | | | | | Mesa doesn't check the parameter passed to glMultiTexCoord*. It does, however, mask the texture value to prevent out-of-bounds writes. This patch will promote this non-conformant behavior to OpenGL ES 1. I don't think anyone will care, and the gets some silly code out of a hot path. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Rearrange placement of GL_TEXTURE_MAX_ANISOTROPY_EXT in APIspecIan Romanick2012-08-201-5/+1
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Remove redundant min/mag filter validationIan Romanick2012-08-202-46/+4
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: use #if over #ifdef in the FEATURE_ES1 check to fix a build failure.Tilman Sauerbeck2012-08-181-1/+1
| | | | | | | | mfeatures.h will define FEATURE_ES1 to 0 if it's not defined yet. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53664 Signed-off-by: Brian Paul <[email protected]>
* mesa: remove unused params, add const qualifiersBrian Paul2012-08-181-5/+4
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: querying GL_TEXTURE_COMPRESSED_IMAGE_SIZE for a buffer obj is illegalBrian Paul2012-08-181-7/+3
| | | | | | | | | GL_INVALID_OPERATION is to be raised when querying a non-compressed image/buffer. Since a buffer object can't have a compressed format this query always generates an error. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es: Don't generate ES1 type conversion wrappersIan Romanick2012-08-173-0/+1672
| | | | | | | | | | These are gradually going to get whittled away and eventually folded into the source files with the native type functions. v2: Add (speculative) SConscript changes. These may be broken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Support GL_TEXTURE_BUFFER in GetTexLevelParameter[if]v in GL 3.1+.Kenneth Graunke2012-08-172-1/+130
| | | | | | | | | | | | | | | | | | | | | The OpenGL 3.1 specification explicitly allows this. Oddly, the ARB_texture_buffer_object spec's issues section claims this isn't allowed, but proceeds to explain that the extension simply doesn't edit the underlying spec to allow it, and thus it didn't appear in the list of legal texture targets. Thus, this patch legalizes it only in 3.1+ contexts, but still returns INVALID_ENUM in earlier contexts that expose ARB_texture_buffer_object. Unfortunately, the behavior of the call is horrendously undefined. Fixes oglconform's tbo/negative.textureParams test. v2: Require desktop OpenGL. Signed-off-by: Kenneth Graunke <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Ian Romanick <[email protected]>
* mesa: Split out part of glGetTexLevelParameter into a helper function.Kenneth Graunke2012-08-171-42/+52
| | | | | | | | | | Move the _mesa_GetTexLevelParameter[iv] functions below the helper function so the prototype is available. This will be useful in the next commit. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add GL_TEXTURE_CUBE_MAP to _mesa_max_texture_levels(). [v2]Kenneth Graunke2012-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For cube maps, _mesa_generate_mipmap() calls this with GL_TEXTURE_CUBE_MAP (the gl_texture_object's Target) rather than one of the faces. This caused _mesa_max_texture_levels() to return 0, which resulted in maxLevels == -1 and the next line's assertion to fail. This function is called from seven places: - fbobject.c: framebuffer_texture() - mipmap.c: _mesa_generate_mipmap() - texgetimage.c: - getteximage_error_check() - getcompressedteximage_error_check() - texparam.c: _mesa_GetTexLevelParameteriv() - texstorage.c: tex_storage_error_check() All of these (or their callers) now explicitly check for invalid targets already, so this shouldn't cause invalid targets to slip through. (Technically _mesa_generate_mipmap() doesn't check for invalid targets, but the API-facing _mesa_GenerateMipmapEXT() function does.) +2 oglconforms (float-texture/mipmap.automatic and mipmap.manual) In addition to fixing the mipmap bug, it should also cause glTexStorage to accept GL_TEXTURE_CUBE_MAP, which is explicitly allowed by the spec. v2: Drop alterations to callers; this is now in a patch series that adds explicit checking to API functions. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add explicit target checking to GetTexLevelParameter[if]v().Kenneth Graunke2012-08-171-3/+38
| | | | | | | | | | | | | | Previously, it relied on _mesa_max_texture_levels() for texture target error checking. This was somewhat dodgy, as _mesa_max_texture_levels() is called in seven diferent places, not all of which necessarily accept the same list of targets. I copied the list of legal targets from _mesa_max_texture_levels(), so this patch should not introduce any change in behavior. Future patches will cause the two to diverge. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add explicit target checking to Get[Compressed]TexImage().Kenneth Graunke2012-08-171-10/+35
| | | | | | | | | | | | | | | | Previously, they relied on _mesa_max_texture_levels() for texture target error checking. This was somewhat dodgy, as _mesa_max_texture_levels() is called in seven diferent places, not all of which necessarily accept the same list of targets. I copied the list of legal targets from _mesa_max_texture_levels() but removed the proxy targets, as both functions explicitly rejected those targets. This changes the order in which we check errors, which could change whether we return INVALID_VALUE or INVALID_ENUM. However, it shouldn't change the list of accepted targets. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: raise GL_INVALID_OPERATION in glGenerateMipmap for missing base imageBrian Paul2012-08-161-0/+2
| | | | | | | | | | | | This seems to be expected by the WebGL texture-mips test. The error makes sense, but I haven't found (yet) any OpenGL documentation specifying this error condition. See http://bugs.freedesktop.org/show_bug.cgi?id=44912 Note: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: add cast to silence warning in _mesa_pack_rgba_span_from_ints()Brian Paul2012-08-161-1/+1
|
* mesa: flush vertices in test_framebuffer_completenessMarek Olšák2012-08-151-0/+3
|
* mesa ReadPixels: handle signed/unsigned integer clampingJordan Justen2012-08-141-3/+10
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa pack: handle packed integer formats with clampingJordan Justen2012-08-141-10/+619
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa unpack: call _mesa_problem when unpack function is not availableJordan Justen2012-08-141-0/+5
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa texstore: handle signed/unsigned integer clampingJordan Justen2012-08-141-20/+75
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa GetTexImage: handle signed/unsigned integer clampingJordan Justen2012-08-141-4/+12
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa pack: handle uint and int clamping properlyJordan Justen2012-08-144-14/+112
| | | | | | | | | | | Rename _mesa_pack_rgba_span_int to _mesa_pack_rgba_span_from_uints. Add _mesa_pack_rgba_span_from_ints. These separate routines allow the integer clamping to be handled properly for signed versus unsigned integers. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Enable GL_ARB_invalidate_subdataIan Romanick2012-08-141-0/+1
| | | | | | | | v2: Add GL_ARB_invalidate_subdata to release notes at Brian's suggestion. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add skeleton implementations of glInvalidateTex{Sub,}ImageIan Romanick2012-08-143-0/+225
| | | | | | | | | | | | | These are part of GL_ARB_invalidate_subdata (but not OpenGL ES 3.0). v2: Add comment explaining why minimum dimensions are set to 1 for some texture targets. Add default case to switch statement to silence compiler warnings and detect new texture targets. Both changes suggested by Brian. Also use _mesa_is_desktop_gl as suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add skeleton implementations of glInvalidateBuffer{Sub,}DataIan Romanick2012-08-141-0/+97
| | | | | | | | | | | | | | | These are part of GL_ARB_invalidate_subdata (but not OpenGL ES 3.0). v2: Use _mesa_bufferobj_mapped instead of testing gl_buffer_object::Pointer as suggested by Brian. Also use _mesa_is_desktop_gl as suggested by Ken. v3: Add a comment by the map subrange / discard range overlap test and fix an off-by-one error noticed by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es: Pass context to _mesa_init_bufferobj_dispatchIan Romanick2012-08-143-5/+9
| | | | | | | | | | | With this change _mesa_init_bufferobj_dispatch won't set function pointers that don't exist in OpenGL ES. v2: Use _mesa_is_desktop_gl and _mesa_is_gles3 as suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add skeleton implementations of glInvalidate{Sub,}FramebufferIan Romanick2012-08-143-0/+154
| | | | | | | | | | | These are part of GL_ARB_invalidate_subdata and OpenGL ES 3.0. v2: Reject aux buffers in core context, and use _mesa_is_desktop_gl and _mesa_is_gles3. Both suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/es3: Add _mesa_is_gles3 predicateIan Romanick2012-08-141-0/+10
| | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Kill GL_ARB_shadow_ambient with fireIan Romanick2012-08-146-35/+0
| | | | | | | | | | 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: Use GLdouble for depthMax in final unpack conversions.Kenneth Graunke2012-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | The final step of _mesa_unpack_depth_span is to take the temporary GLfloat depth values and convert them to the desired format. When converting to GL_UNSIGNED_INTEGER with depthMax > 0xffffff, we use double-precision math to avoid overflow and precision problems. Or at least that's the idea. Unfortunately GLdouble z = depthValues[i] * (GLfloat) depthMax; actually causes single-precision multiplication, since both operands are GLfloats. Casting depthMax to GLdouble causes the scaling to be done with double-precision math. Fixes a regression in oglconform's depth-stencil basic.read.ds test since c60ac7b17993d28af65b04f9bbbf3ee74c35358c, where the expected and actual values differed slightly. For example, 0xcfa7a6 vs. 0xcfa7a4. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49772 Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: Filter a bunch more functions based on APIIan Romanick2012-08-131-89/+116
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise extensions that are part of GL 1.5 in a core contextIan Romanick2012-08-131-3/+3
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise extensions that are part of GL 1.4 in a core contextIan Romanick2012-08-131-12/+12
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise extensions that are part of GL 1.3 in a core contextIan Romanick2012-08-131-6/+6
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise extensions that are part of GL 1.2 in a core contextIan Romanick2012-08-131-10/+10
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't advertise deprecated extensions in a core contextIan Romanick2012-08-131-49/+49
| | | | | | | | | | | | | It may be possible to trim the list of extensions futher. These are just the obvious extensions that add functionality that the core context explicitly forbids. Apple's core-context extension list is *just* the extensions on top of the core GL version. I'm not sure we want to go that far, but removing some things that have been in core since 2.1 may be okay. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/samplerobj: Avoid crash in sampler query if texture unit is disabledPauli Nieminen2012-08-121-1/+3
| | | | | | | | | | | | | Sampler queries are so far made only for enabled texture unit. But if any code would query sampler before checking texture unit state that would result to NULL deference. Making the inline helper easier to use with NULL check makes a lot sense because compiler is likely to combine the checks for the current texture. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unnecessary parameters CompressedTexImagePauli Nieminen2012-08-124-14/+3
| | | | | | | | | In tune with previous patches. Again there is duplication of information in function parameters that is good to remove. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove unnecessary parameters from AllocTextureImageBufferPauli Nieminen2012-08-123-10/+4
| | | | | | | | | | 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]>
* mesa: Remove unnecessary parameters from TexImagePauli Nieminen2012-08-125-15/+8
| | | | | | | | | | | gl_texture_image structure always holds size and internal format before TexImage driver hook is called. Those passing same information in function parameters only duplicates information making the interface harder to understand. Signed-off-by: Pauli Nieminen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: In conditional rendering fallback, check the query status.Eric Anholt2012-08-081-0/+2
| | | | | | | | | | | Otherwise, conditional rendering always takes the fallthrough "render it anyway" case unless the application had itself done a check or wait on the query. Fixes intel oglconform's conditional_render advanced.nofbo.readpixels. Reviewed-by: Brian Paul <[email protected]> NOTE: This is a candidate for the 8.0 branch.