summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/genmipmap.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Do proper format error checks for GenerateMipmap in ES 3.x.Kenneth Graunke2016-03-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | According to the OpenGL ES 3.2 spec's description of GenerateMipmap: "An INVALID_OPERATION error is generated if the levelbase array was not specified with an unsized internal format from table 8.3 or a sized internal format that is both color-renderable and texture-filterable according to table 8.10." Similar text exists in the ES 3.0 specification as well. Our existing rules are pretty close, but miss a few things. The OpenGL specification actually doesn't have any text about internal format checking - our existing code comes from a Khronos bug report. The ES 3.x spec provides a clearer description. Fixes dEQP-GLES3.functional.negative_api.texture.generatemipmap and dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level _array_compressed. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Change GLboolean to bool in GenerateMipmap target checker.Kenneth Graunke2016-03-071-4/+4
| | | | | | | This is not API facing, so just use bool. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: Make GenerateMipmap check the target before finding an object.Kenneth Graunke2016-03-071-6/+12
| | | | | | | | | | | | | | | | | | | | If glGenerateMipmap was called with a bogus target, then it would pass that to _mesa_get_current_tex_object(), which would raise a _mesa_problem() telling people to file bugs. We'd then do the proper error checking, raise an error, and bail. Doing the check first avoids the _mesa_problem(). The DSA variant doesn't take a target parameter, so we leave the target validation exactly as it was in that case. Fixes one dEQP GLES2 test: dEQP-GLES2.functional.negative_api.texture.generatemipmap.invalid_target. v2: Rebase on Antia's recent patch to this area. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> [v1] Reviewed-by: Matt Turner <[email protected]>
* mesa/genmipmap: Added a function to validate the internalformatAntia Puentes2016-03-031-4/+12
| | | | | | | It will be used by the ARB_internalformat_query2 implementation to implement mipmap related queries. Reviewed-by: Dave Airlie <[email protected]>
* mesa/genmipmap: Added a function to check if the target is validAntia Puentes2016-03-031-13/+21
| | | | | | | It will be used by the ARB_internalformat_query2 implementation to implement mipmap related queries. Reviewed-by: Dave Airlie <[email protected]>
* mesa: remove _ARB suffix from cube map enumsBrian Paul2016-02-121-1/+1
| | | | | | | Just minor clean-up so we're consistent everywhere. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* mesa: don't enable online compression for ASTC formatsNanley Chery2015-08-261-0/+1
| | | | | | | | | | | | | In agreement with the ASTC spec, this makes calls to TexImage*D unsuccessful. Implied by the spec, Generate[Texture]Mipmap and [Copy]Tex[Sub]Image*D calls must be unsuccessful as well. v2. actually force attempts to compress online to fail. v3. indentation (Matt). v4. update copytexture_error_check to account for CopyTexImage*D (Chad). Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Nanley Chery <[email protected]>
* mesa: Rename _mesa_lookup_enum_by_nr() to _mesa_enum_to_string().Kenneth Graunke2015-07-201-1/+1
| | | | | | | Generated by sed; no manual changes. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Revert "mesa: Add ARB_direct_state_access checks in texture functions"Ian Romanick2015-05-281-7/+0
| | | | | | | This reverts commit 8940957238e8584ce27295791cee4cc3d6f7cf1e. Acked-by: Fredrik Höglund <[email protected]> Cc: "10.6" <[email protected]>
* mesa: Add ARB_direct_state_access checks in texture functionsFredrik Höglund2015-05-141-0/+7
| | | | | Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* main: Added entry point for glGenerateTextureMipmap.Laura Ekstrand2015-01-081-20/+51
| | | | Reviewed-by: Anuj Phogat <[email protected]>
* mesa: remove unused ctx parameter for _mesa_select_tex_image()Brian Paul2015-01-051-1/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: allow generating mipmaps for cube arraysMarek Olšák2014-03-211-0/+4
| | | | | Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
* mesa: move glGenerateMipmap() code into new genmipmap.c fileBrian Paul2014-02-021-0/+131
Mipmap generation has nothing to do with FBOs. v2: update gl_genexec.py too (not api_exec.c) Acked-by: Kenneth Graunke <[email protected]>