aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* Replace gl_vert_result enum with gl_varying_slot.Paul Berry2013-03-154-76/+42
| | | | | | | | | | | This patch makes the following search-and-replace changes: gl_vert_result -> gl_varying_slot VERT_RESULT_* -> VARYING_SLOT_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* mtypes.h: Modify gl_vert_result to refer to new gl_varying_slot enum.Paul Berry2013-03-151-28/+39
| | | | | | | | This paves the way for eliminating the gl_vert_result enum entirely. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* mtypes.h: Add new gl_varying_slot enum, and bitfield defines.Paul Berry2013-03-151-0/+70
| | | | | | | | | | | Future patches will make use of the enum. It will eventually take the place of the existing enums gl_vert_result, gl_geom_attrib, gl_geom_result, and gl_frag_attrib, all of which represent essentially the same information but using inconsistent values. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* mesa: Fix FB blitting in case of zero size src or dst rectAnuj Phogat2013-03-131-1/+3
| | | | | | | | | | | | | | | Framebuffer blitting operation should be skipped if any of the dimensions (width/height) of src/dst rect is zero. V2: Move the dimension check after error checking in _mesa_BlitFramebuffer. Fixes: fbblit(negative.nullblit.zeroSize) in Intel oglconform https://bugs.freedesktop.org/show_bug.cgi?id=59495 Note: Candidate for all the stable branches. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* tests: Add $(top_srcdir)/include to AM_CPPFLAGS.Vinson Lee2013-03-121-0/+1
| | | | | | | | | | | Fixes this build error with make check. CC collision.o In file included from ../../../../../src/mesa/main/hash_table.h:34:0, from collision.c:31: ../../../../../src/mesa/main/compiler.h:51:53: fatal error: c99_compat.h: No such file or directory Signed-off-by: Vinson Lee <[email protected]>
* mesa: Use PACKAGE_BUGREPORT macro.Matt Turner2013-03-121-1/+1
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove unused version #defines from version.h.Matt Turner2013-03-121-11/+0
| | | | Reviewed-by: Eric Anholt <[email protected]>
* mesa: Replace MESA_VERSION with PACKAGE_VERSION.Matt Turner2013-03-123-3/+3
| | | | | | One fewer place to have to update. Reviewed-by: Eric Anholt <[email protected]>
* mesa,gallium,egl,mapi: One definition of C99 inline/__func__ to rule them all.José Fonseca2013-03-121-51/+5
| | | | | | | | We were in four already... NOTE: Candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* mesa: Use correct functions for enum conversion.Vinson Lee2013-03-111-2/+2
| | | | | | | | Fixes mixing enum types defects reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: don't allocate a texture if width or height is 0 in CopyTexImageMarek Olšák2013-03-111-10/+12
| | | | | | NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>
* mesa: Allow ETC2/EAC formats with ARB_ES3_compatibility.Matt Turner2013-03-082-2/+2
| | | | | | Fixes piglit's oes_compressed_etc2_texture-miptree tests on Desktop GL. Reported-by: Marek Olšák <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: fix glGetInteger*(GL_SAMPLER_BINDING).Alan Hourihane2013-03-073-2/+14
| | | | | | | | | | | If the sampler object has been deleted on another context, an alternative context may reference the old sampler. So ensure the sampler object still exists. Note: this is a candidate for the stable branch. Signed-off-by: Alan Hourihane <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Unreference sampler object when it's currently bound to texture unit.Alan Hourihane2013-03-061-0/+10
| | | | | | | | | | | This change specifically unbinds a sampler object from the texture unit if it's bound to a unit. The spec calls for default object when deleting sampler objects which are currently bound. Note: this is a candidate for the stable branches Signed-off-by: Alan Hourihane <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Remove the special enum for _mesa_error debug output.Eric Anholt2013-03-052-6/+8
| | | | | | | | Now all the per-message enums from mtypes are gone. Now we can extend unique message IDs into all generators of debug output without having to update mtypes.h for each one. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Remove the enum for the oom-within-debug-output case.Eric Anholt2013-03-052-6/+4
| | | | Reviewed-by: Jordan Justen <[email protected]>
* mesa: Remove now-unused gl_winsys_error and gl_shader_error enums.Eric Anholt2013-03-051-8/+0
| | | | Reviewed-by: Jordan Justen <[email protected]>
* mesa: Report ARB_debug_output for both shader errors and warnings.Eric Anholt2013-03-052-3/+6
| | | | | | | | This ends up reusing the dynamic ID support, so a silly enum gets to go away. We don't assign good IDs to different messages yet, but at least that's tractable now. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Add support for GL_ARB_debug_output with dynamic ID allocation.Eric Anholt2013-03-052-4/+60
| | | | | | | We can emit messages now without always having to use the same ID for each, or having a giant table of all possible errors in mtypes.h. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Merge handling of application-provided and built-in error sources.Eric Anholt2013-03-052-232/+131
| | | | | | | | | I want to have dynamic IDs so that we don't need to add to mtypes.h for every error we might want to add. To do so, I need to get rid of the static arrays and actually support all the crazy filtering of dynamic IDs that we already support for application-provided error sources. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Fix _mesa_problem() on context destroy after application debug outputEric Anholt2013-03-051-0/+6
| | | | | | | | | | This was apparently not noticed because we don't have any testing of application-generated debug output. However, as I'm changing the GL-generated debug output to use the same path as application/middleware-generated debug output, this obviously became an issue. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Move debug type/severity enums to mesa core.Eric Anholt2013-03-052-68/+91
| | | | | | | | | | | These will get reused by new ARB_debug_output messages in drivers/core, instead of having the caller pass GL enums and have us immediately switch-statement those into enums. Add source enums will be handled in the next commit, because the way different sources are handled at the moment is pretty strange. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Replace open-coded _mesa_lookup_enum_by_nr().Eric Anholt2013-03-051-35/+3
| | | | | | | The new one doesn't have the same behavior for GL_NO_ERROR, but we don't produce errors with GL_NO_ERROR as the error type. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Remove extra #define MAXSTRING duplicating MAX_DEBUG_MESSAGE_LENGTH.Eric Anholt2013-03-051-15/+14
| | | | Reviewed-by: Jordan Justen <[email protected]>
* Add missing GL_TEXTURE_CUBE_MAP entry in _mesa_legal_texture_dimensionsAlan Hourihane2013-03-051-0/+1
| | | | | | | | | This was hit on the glTexStorage2D() path. Note: this is a candidate for the stable branches Signed-off-by: Alan Hourihane <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Fix out-of-tree build of 'make check' in src/mesa/main/testsJon TURNEY2013-03-051-4/+4
| | | | | Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Andreas Boll <[email protected]>
* mesa: flush current state when querying GL_EDGE_FLAGBrian Paul2013-03-041-1/+1
| | | | | | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=61395 Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: Add a new QueryCounter() hook for TIMESTAMP queries.Kenneth Graunke2013-03-012-3/+9
| | | | | | | | | | | | | | | | | | | | In OpenGL, most queries record statistics about operations performed between a defined beginning and ending point. However, TIMESTAMP queries are different: they immediately return a single value, and there is no start/stop mechanism. Previously, Mesa implemented TIMESTAMP queries by calling EndQuery without first calling BeginQuery. Apparently this is DirectX convention, and Gallium followed suit. I personally find the asymmetry jarring, however---having BeginQuery and EndQuery handle a different set of enum values looks like a bug. It's also a bit confusing to mix the one-shot query with the start/stop model. So, add a new QueryCounter driver hook for implementing TIMESTAMP. For now, fall back to EndQuery to support drivers that don't do the new mechanism. Signed-off-by: Kenneth Graunke <[email protected]>
* mesa: implement TexImage*MultisampleChris Forbes2013-03-021-4/+163
| | | | | | | | | | | | | | | | V2: - fix formatting issues - generate GL_OUT_OF_MEMORY if teximage cannot be allocated - fix for state moving from texobj to image V3: - remove ridiculous stencil hack - alter format check to not allow a base format of STENCIL_INDEX - allow width/height/depth to be zero, to deallocate the texture - dont forget to call _mesa_update_fbo_texture V4: - fix indentation - don't throw errors on proxy texture targets Signed-off-by: Chris Forbes <[email protected]>
* mesa: support multisample textures in framebuffer completeness checkChris Forbes2013-03-021-14/+37
| | | | | | | | | | | | | | | | | | | | | | | - sample count must be the same on all attachments - fixedsamplepositions must be the same on all attachments (renderbuffers have fixedsamplepositions=true implicitly; only multisample textures can choose to have it false) V2: - fix wrapping to 80 columns, debug message, fix for state moving from texobj to image. - stencil texturing tweaks tidied up and folded in here. V3: - Removed silly stencil hacks entirely; the extension doesn't actually make stencil-only textures legal at all. - Moved sample count / fixed sample locations checks into existing attachment-type-specific blocks, as suggested by Eric V4: - Removed stencil hacks which were missed in V3 (thanks Eric) - Don't move the declaration of texImg; only required pre-V3. Signed-off-by: Chris Forbes <[email protected]> [V2] Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: implement sample maskChris Forbes2013-03-025-2/+53
| | | | | | | | | | | | | | | | V2: - fix multiline comment style - stop using ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH since that doesn't exist anymore. V3: - check for the extension being enabled - tidier flagging of _NEW_MULTISAMPLE - fix weird indentation in get.c V4: - move flush later in SampleMaski() Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: implement GetMultisamplefvChris Forbes2013-03-022-2/+31
| | | | | | | | | | | | | | | Actual sample locations deferred to a driverfunc since only the driver really knows where they will be. V2: - pass the draw buffer to the driverfunc; don't fallback to pixel center if driverfunc is missing. - rename GetSampleLocation to GetSamplePosition - invert y sample position for winsys FBOs, at Paul's suggestion Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add new max sample count stateChris Forbes2013-03-023-0/+13
| | | | | | | | | | | | | | - GL_MAX_COLOR_TEXTURE_SAMPLES - GL_MAX_DEPTH_TEXTURE_SAMPLES - GL_MAX_INTEGER_SAMPLES V2: initialize limits to 1 in _mesa_init_constants as suggested by Brian and Paul Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* tests: add ARB_texture_multisample enums to tableChris Forbes2013-03-021-0/+21
| | | | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add texobj support for ARB_texture_multisampleChris Forbes2013-03-0210-22/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the new texture targets, and per-image state for GL_TEXTURE_SAMPLES and GL_TEXTURE_FIXED_SAMPLE_LOCATIONS. V2: - Allow multisample texture targets in glInvalidateTexSubImage too. This was already partly there, but I missed it the first time around since the interaction is defined in a newer extension. Fixed weird indentation. - Allow multisample array textures in glFramebufferTextureLayer. This was overlooked as the tests originally only used 2d multisample textures. V3: - Set min/mag filters sensibly for multisample textures. This can't actually be changed by the user, so it's more sensible to initialize it correctly than to hack around it being bogus later. V4: - Tidy up initial min/mag filter setup. Setup in _mesa_initialize_texture_object was bogus, but benign since finish_texture_init() clobbered everything with correct values. For V4, just do the setup in finish_texture_init(). V5: - Don't break glPopAttrib(GL_TEXTURE_BIT) Signed-off-by: Chris Forbes <[email protected]> [V2] Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: add ARB_texture_multisampleChris Forbes2013-03-025-4/+57
| | | | | | | | | | | | | | | | | | | | Adds new enums, dispatch machinery, and stubs for the 4 new entrypoints. V2: - Drop placeholder - Align enum values - Remove explicit exec=mesa; it *is* the dispatch flavor we want, but it's also the default. I misunderstood how this worked before; after actually reading the generator it makes good sense. V3: - Squash in stubs for new entrypoints, and dispatch_sanity tweaks, so we don't get build breakage between those patches. V4: - Fix various remaining whitespace issues Signed-off-by: Chris Forbes <[email protected]> [1/3 V2] Reviewed-by: Matt Turner <[email protected]> [V3] Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa version: add _mesa_get_gl_version_overrideJordan Justen2013-02-282-27/+70
| | | | | | | | | This will allow other code to get access to the override version before a context is available. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* attrib: push/pop FRAGMENT_PROGRAM_ARB stateJordan Justen2013-02-281-0/+12
| | | | | | | | | | | | | | This requirement was added by ARB_fragment_program When the Steam overlay is enabled, this fixes: * Menu corruption with the Puddle game * The screen going black on Rochard when the Steam overlay is accessed NOTE: This is a candidate for the 9.0 and 9.1 branches. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* texobj: add verbose api trace messages to several routinesJordan Justen2013-02-271-0/+21
| | | | | | | | Motivated by wanting to see if GenTextures was called by an application while debugging another Steam overlay issue. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa/es: NULL check in EGLImageTargetTexture2DOESTapani Pälli2013-02-251-0/+6
| | | | | | | | | check that pointer passed is valid and return error if not. Note: This is a candidate for the stable branches. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: add missing case in _mesa_GetTexParameterfv()Tapani Pälli2013-02-251-0/+6
| | | | | | | | | | missing case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES is required by OES_EGL_image_external extension. Note: This is a candidate for the stable branches. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* mesa: Fix setup of ctx->Point.PointSprite for GLES2.Eric Anholt2013-02-222-2/+2
| | | | | | | | | | | The recent change for GL core broke the older setup, which broke gl_PointCoord on pre-gen6 (where gl_PointCoord is undefined if point sprites are disabled). Fixes the new piglit GLES-2.0/glsl-fs-pointcoord test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32429 Note: This is a candidate for the stable branches. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Don't install glEvalMesh in the beginend dispatch tableIan Romanick2013-02-203-9/+16
| | | | | | | | NOTE: This is a candidate for the 9.1 branch. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59740 Reviewed-by: Eric Anholt <[email protected]>
* gles2: a stub implementation for GL_EXT_discard_framebufferTapani Pälli2013-02-205-1/+63
| | | | | | | | | | | This patch implements a stub for GL_EXT_discard_framebuffer with required checks listed by the extension specification. This extension is required by GLBenchmark 2.5 when compiled with OpenGL ES 2.0 as the rendering backend. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-and-tested-by: Chad Versace <[email protected]>
* st/mesa: simplify and improve CopyTexSubImageMarek Olšák2013-02-182-16/+25
| | | | | | | | | | | | | | | | | | | | It has become a bit messy. Changes: - finally correct checking for transfer ops depending on the base format - making sure the base internal format and the texture format match (we were ignoring it, but it's important for correctness) - the way-too-strict rule that both src and dst base formats must be the same was dropped; ensuring the simpler and more permissive rule mentioned above is enough - stop using util_blit_pixels; pipe->blit is flexible enough, and now that we have RGBX and red-alpha formats, pipe->blit can be used for more cases Reviewed-by: Brian Paul <[email protected]>
* st/mesa: implement blit-based TexImage and TexSubImageMarek Olšák2013-02-182-2/+23
| | | | | | | | | | | | | | | | | | | A temporary texture is created such that it matches the format and type combination and pixels are copied to it using memcpy. Then the blit is used to copy the temporary texture to the texture image being modified by TexImage or TexSubImage. The blit takes care of the format and type conversion and swizzling. The result is a very fast texture upload involving as little CPU as possible. This improves performance in apps which upload textures during rendering. An example is the Wine OpenGL backend for DirectDraw, which I used to test the game StarCraft. Profiling had shown that TexSubImage was taking 50% of CPU time without this patch, which was the main motivation for this work, and now TexSubImage only takes 14% of CPU time. I had to underclock my CPU to see any difference in the game and this patch does make the game a lot faster if the CPU is slow (or using the powersave cpufreq profile). Reviewed-by: Brian Paul <[email protected]>
* mesa: Use PROGRAM_ERROR_STRING_ARB instead of the _NV nameMatt Turner2013-02-151-1/+1
| | | | | | | Since NV_fragment_program is now gone. No functional change, since the values are identical. Reviewed-by: Kenneth Graunke <[email protected]>
* shaderapi: Fix AttachShader errorbma2013-02-131-0/+14
| | | | | | | | | | | | | | | Detect a duplicate Shader type as and error instead of silently allowing it, restrict to ES2 API. v2: Tapani Pälli <[email protected]> - make the check run time instead of compile time v3: chadv - Quote spec on which error to generate. Signed-off-by: bma <[email protected]> Signed-off-by: Tapani Pälli <[email protected]> Reviewed-and-tested-by: Chad Versace <[email protected]>
* CopyTexImage: Don't check sRGB vs LINEAR for desktop GLJordan Justen2013-02-121-18/+10
| | | | | | | | | | | | | | In OpenGL 4.3, new language was added that would require this check. But, if this check results in broken applications then perhaps it will be reversed. For now, remove this check and re-evaluate when desktop GL 4.3 is closer. NOTE: This is a candidate for the 9.1 branch. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: fix GetTexImage if mesa format and internal format don't matchMarek Olšák2013-02-112-0/+71
| | | | | | | | Tested with softpipe only exposing RGBA formats. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul <[email protected]>