summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Stop clamping stencil reference value at specification timeChris Forbes2013-05-151-9/+0
| | | | | | | | | | | | All drivers now clamp this to the appropriate range for the bound stencil buffer when emitting stencil state. NOTE: This is a candidate for stable branches. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Use accessor for stencil reference values in glGetChris Forbes2013-05-152-2/+6
| | | | | | | | | NOTE: This is a candidate for stable branches. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add accessor for effective stencil refChris Forbes2013-05-151-0/+14
| | | | | | | | | | | | | | Clamps the stencil reference value to the range representable in the currently-bound draw framebuffer's stencil attachment. V2: Add spec quote. NOTE: This is a candidate for stable branches. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* extensions: add AMD_vertex_shader_layerJordan Justen2013-05-132-1/+3
| | | | | | | | | | This extension will require driver support, so it must be enabled by the driver. http://www.opengl.org/registry/specs/AMD/vertex_shader_layer.txt Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Expose GL_OES_texture_npot on GLES1Chad Versace2013-05-131-1/+1
| | | | | | | | | | | | | Mesa's extension table incorrectly lists this GL_OES_texture_npot as ES2-only. It's also an ES1 extension. This patch adds ES1 to the extensions API mask. From the GL_OES_texture_npot spec: OpenGL ES 1.0 or OpenGL ES 2.0 is required. This extension is written against OpenGL ES 1.1.12 and OpenGL ES 2.0.25. Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Move the mvp_with_dp4 flag to ShaderCompilerOptions.Kenneth Graunke2013-05-124-24/+7
| | | | | | | | | | | | | | | This flag essentially tells the compiler whether it prefers dot products or multiply/adds for matrix operations. As such, ShaderCompilerOptions seems like the right place for it. This also lets us specify it on a per-stage basis. This patch makes all existing users set the flag for the Vertex Shader stage only, as it's currently only used for fixed-function vertex programs. That will change soon, and I wanted to preserve the existing behavior. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl: Pass struct shader_compiler_options into do_common_optimization.Kenneth Graunke2013-05-121-1/+4
| | | | | | | | | | | | | do_common_optimization may need to make choices about whether to emit certain kinds of instructions. gl_context::ShaderCompilerOptions contains exactly that information, so it makes sense to pass it in. Rather than passing the whole array, pass the structure for the stage that's currently being worked on. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Add comments about bit-ordering of new XRGB/XBGR formats.Kenneth Graunke2013-05-121-15/+15
| | | | | | | | | | | | | Marek added these new formats in commit f9fa725690c470daf308, but without comments relating to the packing. Sometimes the naming is confusing, so these comments are helpful in determining whether two formats are compatible. The new comments are based on my reading of format_unpack.c. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: add & use a new driver flag for UBO updates instead of _NEW_BUFFER_OBJECTMarek Olšák2013-05-113-2/+11
| | | | | | | v2: move the flagging from intel_bufferobj_data to intel_bufferobj_alloc_buffer Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: skip _MaxElement computation unless driver needs strict bounds checkingMarek Olšák2013-05-111-1/+3
| | | | | | | | | | | | If Const.CheckArrayBounds is false, the only code using _MaxElement is glDrawRangeElements, so I changed it and explained in the code why _MaxElement is not very useful there. BTW, the big magic number was copied to the letter from _mesa_update_array_max_element. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove unused gl_array_object::NewArrayMarek Olšák2013-05-114-10/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: remove unused gl_constants::MaxColorTableSizeMarek Olšák2013-05-113-6/+0
| | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: unify MaxVertexVaryingComponents and MaxGeometryVaryingComponentsMarek Olšák2013-05-114-9/+4
| | | | | | | | | The limits should not be different and OpenGL requires both to be at least 32, which is also the maximum limit on radeon. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: move max texture image unit constants to gl_program_constantsMarek Olšák2013-05-115-20/+18
| | | | | | | | | | Const.MaxTextureImageUnits -> Const.FragmentProgram.MaxTextureImageUnits Const.MaxVertexTextureImageUnits -> Const.VertexProgram.MaxTextureImageUnits etc. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: consolidate definitions of max texture image unitsMarek Olšák2013-05-112-8/+4
| | | | | | | Shaders are unified on most hardware (= same limits in all stages). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Make Mesa core set up wrapped texture renderbuffer state.Eric Anholt2013-05-061-0/+7
| | | | | | | | | | Everyone was doing effectively the same thing, except for some funky code reuse in Intel, and swrast mistakenly recomputing _BaseFormat instead of using the texture's _BaseFormat. swrast's sRGB handling is left in place, though it should be done by using _mesa_get_render_format() at render time instead (as-is, it will miss updates to GL_FRAMEBUFFER_SRGB). Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Make core Mesa allocate the texture renderbuffer wrapper.Eric Anholt2013-05-063-7/+49
| | | | | | Every driver did the same thing. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add infrastructure for ARB_gpu_shader5.Matt Turner2013-05-062-0/+2
| | | | Reviewed-by: Chris Forbes <[email protected]>
* mesa: whitespace, formatting fixes, etc in api_arrayelt.cBrian Paul2013-05-031-35/+65
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: change ctx->Driver.NeedFlush to GLbitfield and update commentBrian Paul2013-05-031-3/+3
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa; change ctx->Driver.SaveNeedFlush to boolean, and document it.Brian Paul2013-05-031-1/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: update comments, simplify code in vtxfmt.cBrian Paul2013-05-021-8/+6
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: update GLvertexformat commentsBrian Paul2013-05-021-20/+7
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove GLvertexformat::EvalMesh1(), EvalMesh2()Brian Paul2013-05-025-30/+3
| | | | | | See previous commit comments. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove GLvertexformat::Rectf()Brian Paul2013-05-023-7/+2
| | | | | | As with the glDraw* functions, this doesn't have to be in GLvertexformat. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: simplify dispatch for glDraw* functionsBrian Paul2013-05-023-129/+17
| | | | | | | | | | | | Remove all the glDraw* functions from the GLvertexformat structure. The point of that dispatch struct is to handle all the functions which dispatch differently depending on whether we're inside glBegin/End. glDraw* are never allowed inside glBegin/End so we can remove those entries. This simplifies the code paths and gets rid of quite a bit of code. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove _MESA_INIT_EVAL_VTXFMT() macroBrian Paul2013-05-022-13/+8
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove _MESA_INIT_ARRAYELT_VTXFMT() macroBrian Paul2013-05-022-5/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove _MESA_INIT_DLIST_VTXFMT() macroBrian Paul2013-05-022-7/+2
| | | | | | Just expand the code. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: change _mesa_inside_dlist_begin_end() to handle PRIM_UNKNOWNBrian Paul2013-05-022-5/+3
| | | | | | | | | | | | If the currently compiled primitive state is PRIM_UNKNOWN we should not return true from _mesa_inside_dlist_begin_end(). This lets us simplify the calls to that function. Note, the call to _mesa_inside_dlist_begin_end() in vbo_save_EndList() should have probably been checking for PRIM_UNKNOWN too, but it wasn't. So there's no code change change. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: comments, formatting fixes in dlist codeBrian Paul2013-05-021-3/+10
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: don't install glDraw* functions into the BeginEnd dispatch tableBrian Paul2013-05-021-30/+43
| | | | | | | | | Functions like glDrawArrays, glDrawElements, etc. are illegal between glBegin/glEnd and should generate GL_INVALID_OPERATION. Fixes several piglit gl-1.0-beginend-coverage failures. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: add missing error check in _mesa_EndList()Brian Paul2013-05-021-0/+6
| | | | | | | | | If we're in GL_COMPILE_AND_EXECUTE mode and inside glBegin, calling glEndList() should generate an error. Fixes a failure in piglit's gl-1.0-beginend-coverage test. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove unused PRIM_INSIDE_UNKNOWN_PRIM constantBrian Paul2013-05-023-10/+6
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: simplify save_Begin() error checkingBrian Paul2013-05-021-20/+13
| | | | | | | | The old code was hard to understand and not entirely correct. Note that PRIM_INSIDE_UNKNOWN_PRIM is no longer set anywhere so we'll be able to remove that next. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: refactor _mesa_valid_prim_mode()Brian Paul2013-05-022-14/+24
| | | | | | | ...in terms of new _mesa_is_valid_prim_mode(). We need a mode validater function that doesn't depend on current state for the display list code. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix CurrentSavePrimitive <= GL_POLYGON testsBrian Paul2013-05-021-2/+2
| | | | | | | Use the new PRIM_MAX value instead so that new geometry shader primitive types are accounted for. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: adjust PRIM_x constants for geometry shadersBrian Paul2013-05-021-3/+4
| | | | | | | | | These values pertain to display lists, and the new types of geometry shader primitives can be used in display lists. And add new PRIM_MAX constant for follow-on changes. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: fix save_ShadeModel() logic and add new commentsBrian Paul2013-05-021-4/+5
| | | | | | | | | | | | | | | | This removes the test for _mesa_inside_dlist_begin_end(). If ctx->Driver.CurrentSavePrimitive==PRIM_UNKNOWN (the initial value), _mesa_inside_dlist_begin_end() will, confusingly, return TRUE. So we didn't set the ctx->ListState.Current.ShadeModel value and it remained in its indeterminate state. This didn't effect correctness, but it defeated the intended optimization of dropping redundant glShadeModel() state changes in order to coalesce sequences of drawing commands. Verified with new piglit gl-1.0-dlist-shademodel test. Reviewed-by: Jose Fonseca <[email protected]>
* mesa: implement glFramebufferTextureJordan Justen2013-05-012-0/+20
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add Layered field to framebuffersJordan Justen2013-05-012-0/+22
| | | | | | | | | | | When checking framebuffer completeness, we test each attachment. We verify that all attachments are consistent in terms of layers. 1. They must all be layered, or all non-layered 2. If they are layered, they must match in depth Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add renderbuffer attachment Layered fieldJordan Justen2013-05-013-8/+12
| | | | | | | | If glFramebufferTexture is used, then the framebuffer attachment is layered. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add renderbuffer Depth fieldJordan Justen2013-05-012-0/+2
| | | | | | | | | | With glFramebufferTexture, a renderbuffer may support all layers of the texture, so we need the depth of the renderbuffer to check for consistency which is required for framebuffer completeness. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* build: remove unused API_DEFINESAndreas Boll2013-05-012-2/+2
| | | | Reviewed-by: Matt Turner <[email protected]>
* mesa: Make a Mesa core function for sRGB render encoding handling.Eric Anholt2013-04-302-0/+21
| | | | | | | | v2: const-qualify ctx, and add a comment about the function (recommended by Brian and Kenneth). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* mesa: Add a clarifying comment about rowStride of compressed textures.Eric Anholt2013-04-301-1/+3
| | | | | | | I always forget how we do this for compressed textures. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* swrast: Replace ImageOffsets with an ImageSlices pointer.Eric Anholt2013-04-306-112/+78
| | | | | | | | | | | | | This is a step toward allowing drivers to use their normal mapping paths, instead of requiring that all slice mappings come from an aligned offset from the first slice's map. This incidentally fixes missing slice handling in FXT1 swrast. v2: Use slice height helper function. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Mesa: Use mmap on Haiku for executable memory vs mallocAlexander von Gluck IV2013-04-291-1/+1
| | | | * Haiku now has DEP enabled by default.
* mesa: Fix error checking for GS UBO getters.Eric Anholt2013-04-291-2/+7
| | | | | These are supposed to be present if both things are available, but we were enabling them if either one was.
* mesa: Add a clarifying comment about EXTRA_ error checking.Eric Anholt2013-04-291-1/+7
|