aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Remove EXT_abgr extension enable flagIan Romanick2011-09-262-3/+1
| | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is required in desktop OpenGL. The existing support is already partially broken in Mesa (e.g., using format=GL_ABGR for glTexImage2D in OpenGL ES 2.x). This patch does not change the situation in any way. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove EXT_bgra and EXT_texture_format_BGRA8888 extension enable flagsIan Romanick2011-09-264-8/+9
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. EXT_texture_format_BGRA8888 is mostly a subset of EXT_bgra. The only difference seems to be that EXT_texture_format_BGRA8888 allows GL_BGRA as an internal format to glTexImage2D and friends. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove OES_read_format extension enable flagIan Romanick2011-09-263-11/+3
| | | | | | | | | | | | This extension is always enabled, and drivers do not have to option to disable it. I kept this one separate from the others because I was a little uncertain about the changes to get.c. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* mesa: Remove all mention of EXT_vertex_array_setIan Romanick2011-09-262-2/+0
| | | | | | | | Mesa has never any portion of this extension, and neither has any other vendor. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix extension year for EXT_texture_env_combineIan Romanick2011-09-261-1/+1
| | | | | | | | | | The year 2006 apparently came from the "Last Modified Date" in the spec header. however, the revision history at the bottom say "2/22/00 mjk - added NVIDIA Implementation Details." From that we can safely infer that the spec is from at least 2000, and it may even be older. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Remove many extension enable flagsIan Romanick2011-09-264-74/+23
| | | | | | | | | | | | | | | | | | | | | | | | | The following extensions are always enabled, and drivers do not have to option to disable them: GL_ARB_multisample GL_ARB_texture_compression GL_ARB_vertex_buffer_object / GL_OES_mapbuffer GL_EXT_copy_texture GL_EXT_multi_draw_arrays / GL_SUN_multi_draw_arrays GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_edge_clamp / GL_SGIS_texture_edge_clamp GL_EXT_vertex_array GL_SGIS_generate_mipmap This set was picked because the are all either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. The existing support for some is already partially broken in Mesa (e.g., proxy texture targets in OpenGL ES). This patch does not change the situation in any way. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Also set the remaining draw buffers to GL_NONE when updating just the ↵Henri Verbeet2011-09-251-15/+14
| | | | | | | | | | | | | | | | | first buffer in _mesa_drawbuffers(). Without this we'd miss the last update in a sequence like {COLOR0, COLOR1}, {COLOR0}, {COLOR0, COLOR1}. I originally had a patch for this that called updated_drawbuffers() when the buffer count changed, but later realized that was wrong. The ARB_draw_buffers spec explicitly says "The draw buffer for output colors beyond <n> is set to NONE.", and this is queryable state. This fixes piglit arb_draw_buffers-state_change. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Henri Verbeet <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Decode GL_CLIP_DISTANCE[67] properly in _mesa_set_enable().Paul Berry2011-09-231-6/+8
| | | | | | | | | | | | | In order to support 8 clip distances, we need to properly decode when the user sets the GL_CLIP_DISTANCE6 and GL_CLIP_DISTANCE7 enable flags. For clarity, this patch changes the names GL_CLIP_PLANE[0-5] in the switch statement to the equivalent names GL_CLIP_DISTANCE[0-5], since the GL_CLIP_PLANE names are deprecated. Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* mesa: set up gl_vert_result and gl_frag_attrib values for gl_ClipDistance.Paul Berry2011-09-231-6/+10
| | | | | | | | | | | | This patch assigns enumerated values for gl_ClipDistance in the gl_vert_result and gl_frag_attrib enums, so that driver back-ends can assign gl_ClipDistance to the appropriate hardware registers. It also adjusts the functions _mesa_vert_result_to_frag_attrib() and _mesa_frag_attrib_to_vert_result() (which translate between the two enums) to correctly translate the new enumerated values. Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* mesa: Add a flag to indicate whether a program uses gl_ClipDistance.Paul Berry2011-09-231-0/+6
| | | | | | | | | | | | | | | | | | GLSL 1.30 requires us to use gl_ClipDistance for clipping if the vertex shader contains a static write to it, and otherwise use user-defined clipping planes. Since the driver needs to behave differently in these two cases, we need a flag to record whether the shader has written to gl_ClipDistance. The new flag is called UsesClipDistance. We initially store it in gl_shader_program (since that is the data structure that is available when we check to see whethe gl_ClipDistance was written to), and we later copy it to a flag with the same name in gl_vertex_program, since that is a more convenient place for the driver to access it (in i965, at least). Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
* glsl: Implement a lowering pass for gl_ClipDistance.Paul Berry2011-09-231-0/+1
| | | | | | | | | | | | | | | | | | | In i965 GEN6+ (and I suspect most other hardware), gl_ClipDistance needs to be laid out as a pair of vec4's (the first containing clip distances 0-3, and the second containing clip distances 4-7). However, it is declared in GLSL as an array of 8 floats. This lowering pass acts at the GLSL level, modifying the declaration of gl_ClipDistance so that it is an array of vec4's rather than an array of floats, and renaming it to gl_ClipDistanceMESA. In addition, it modifies all accesses to the array so that they access the appropiate component of one of the vec4's. Since some hardware may not internally represent gl_ClipDistance as a pair of vec4's, this lowering pass is optional. To enable it, set the LowerClipDistance flag in gl_shader_compiler_options to true. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: remove support for GL_APPLE_client_storage extensionBrian Paul2011-09-226-16/+1
| | | | | | | AFAIK, there are few users of this extension and I can see a couple reasons why this is probably broken in Mesa anyway. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move gl_texture_image::Width/Height/DepthScale fields to swrastBrian Paul2011-09-222-16/+0
| | | | | | | These fields were only used for swrast so move them into swrast_texture_image. Reviewed-by: Ian Romanick <[email protected]>
* mesa: move gl_texture_image::_IsPowerOfTwo into swrastBrian Paul2011-09-222-8/+0
| | | | | | It's only used by swrast. Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add a context flag indicating whether two-sided lighting should happen.Eric Anholt2011-09-212-1/+19
| | | | | The 965 driver was ignoring the VERTEX_PROGRAM_TWO_SIDE flag and only looking at fixed-function state.
* mesa: check glBegin()/glDrawArrays()/etc mode with _mesa_valid_prim_mode()Brian Paul2011-09-213-7/+34
| | | | | | | | | We now raise an GL_INVALID_ENUM in glBegin() if mode is illegal, as was done in Yuanhan Liu's original patch. Take geometry shaders support into account too. Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: fix PACK_COLOR_5551(), PACK_COLOR_1555() macrosBrian Paul2011-09-201-2/+2
| | | | | | | | | | | The 1-bit alpha channel was incorrectly encoded. Previously, any non-zero alpha value for the ubyte alpha value would set A=1. Instead, use the most significant bit of the ubyte alpha to determine the A bit. This is consistent with the other channels and other OpenGL implementations. Note: This is a candidate for the 7.11 branch. Reviewed-by: Michel Dänzer <[email protected]>
* mesa: move last bits of GLchan stuff into swrastBrian Paul2011-09-203-99/+1
| | | | | This removes the last remnants of the GLchan datatype and associated macros out of core Mesa and into swrast.
* mesa: remove CHAN_TYPE cruft from debug.cBrian Paul2011-09-201-4/+0
|
* mesa: remove unused interp/stride chan macrosBrian Paul2011-09-201-27/+0
|
* mesa: remove unused UNCLAMPED_FLOAT_TO_RGB_CHAN() macroBrian Paul2011-09-201-16/+0
|
* mesa: remove unused <type>_TO_CHAN() macrosBrian Paul2011-09-201-40/+0
|
* mesa: convert _mesa_unpack_color_span_chan() to ubyteBrian Paul2011-09-203-55/+53
|
* mesa: replace GLchan with GLubyte in texcompress_s3tc.cBrian Paul2011-09-201-59/+57
|
* mesa/gallium: remove GLchan from latc, rgtc codeBrian Paul2011-09-202-15/+15
|
* mesa: remove GLchan in texcompress_fxt1.cBrian Paul2011-09-201-74/+53
|
* mesa: s/_mesa_make_temp_chan_image()/_mesa_make_temp_ubyte_image()Brian Paul2011-09-205-123/+123
| | | | Another step toward eliminating the GLchan type.
* mesa: move _mesa_upscale_teximage2d() to texcompress_fxt1.cBrian Paul2011-09-203-43/+38
| | | | Was used by no other code.
* mesa: s/GLchan/GLubyte/ in mipmap generation codeBrian Paul2011-09-201-3/+3
|
* mesa: Don't expose compressed paletted formats via ↵Ian Romanick2011-09-201-15/+17
| | | | | | | | | | | | GL_{NUM_,}COMPRESSED_TEXTURE_FORMATS Fixes a bug introduced by commit faf5d65. These formats should only be exposed in OpenGL ES 1.x. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Cc: Xun Fang <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40860
* Increase MAX_CLIP_PLANES to 8Paul Berry2011-09-201-2/+5
| | | | | | | | | | | | This will allow drivers to increase ctx->Const.MaxClipPlanes to 8, which is required for GLSL-1.30 compliance. No driver behavior should be affected. However, many data structures use MAX_CLIP_PLANES as an array size, so these arrays will get slightly larger. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* Hardcode the default value of ctx->Const.MaxClipPlanes to 6.Paul Berry2011-09-201-1/+1
| | | | | | | | | | | Previously this value was set to MAX_CLIP_PLANES, which is defined to be 6. But MAX_CLIP_PLANES needs to be increased to 8 to support GLSL-1.30-compliant drivers. This patch hard-codes the default value of ctx->Const.MaxClipPlanes to 6, so that when MAX_CLIP_PLANES is increased, it won't affect drivers that do not support 8 clip planes. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Update clipping code to use ctx->Const.MaxClipPlanes.Paul Berry2011-09-202-3/+3
| | | | | | | | | | | | | To support GLSL 1.30, we will need to increase MAX_CLIP_PLANES to 8. To avoid breaking drivers that do not yet support 8 clip planes, this patch modifies the Mesa core code that pertains to clipping to use ctx->Const.MaxClipPlanes rather than MAX_CLIP_PLANES, since ctx->Const.MaxClipPlanes will remain 6 for drivers that only support 6 clip planes. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glapi: Update generated file modified by previous commitIan Romanick2011-09-191-3057/+1814
|
* mesa: Delete stale comment about MESAX extensionsIan Romanick2011-09-191-2/+0
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Replace _mesa_rgba_logicop_enabled(ctx) with ↵Ian Romanick2011-09-191-12/+0
| | | | | | | | | | | | ctx->Color.ColorLogicOpEnabled Since GL_EXT_blend_logic_op is removed, _mesa_rgba_logicop_enabled(ctx) just returns ctx->Color.ColorLogicOpEnabled. That seems kind of silly. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Use ColorLogicOpEnabled instead of _LogicOpEnabledIan Romanick2011-09-193-18/+0
| | | | | | | | | | Since GL_EXT_blend_logic_op is removed, _LogicOpEnabled and ColorLogicOpEnabled always have the same value. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Remove support for GL_EXT_blend_logic_opIan Romanick2011-09-194-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Support is removed for four reasons: 1. The implementation was broken with respect to separate blend equations. The GL_EXT_blend_equation_separate spec says: "If EXT_blend_logic_op and EXT_blend_equation_separate are both supported, the logic op blend equation should be supported separately for RGB and alpha as with the other blend equation modes." But Mesa's implementation of GL_LOGIC_OP specifically forbids this. 2. No hardware supported by Mesa can support separate blend equations involving GL_LOGIC_OP. 3. No applications could be found that use this extension. 4. No other Linux OpenGL drivers support this extension. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]>
* mesa: Remove unused _mesa_enable_imaging_extensions functionIan Romanick2011-09-192-19/+0
| | | | | | | | | | The last user of this function was driInitExtensions, and that function was removed in a previous commit. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Throw an error when starting conditional render on an active query.Eric Anholt2011-09-191-1/+1
| | | | | | | | | | | | | | | From the NV_conditional_render spec: BeginQuery sets the active query object name for the query type given by <target> to <id>. If BeginQuery is called with an <id> of zero, if the active query object name for <target> is non-zero, if <id> is the active query object name for any query type, or if <id> is the active query object for condtional rendering (Section 2.X), the error INVALID OPERATION is generated. Fixes piglit nv_conditional_render-begin-while-active. Reviewed-by: Brian Paul <[email protected]>
* mesa: Throw an error instead of asserting for condrender with query == 0.Eric Anholt2011-09-191-1/+2
| | | | | | | | | | | | | | | From the NV_conditional_render spec: BeginQuery sets the active query object name for the query type given by <target> to <id>. If BeginQuery is called with an <id> of zero, if the active query object name for <target> is non-zero, if <id> is the active query object name for any query type, or if <id> is the active query object for condtional rendering (Section 2.X), the error INVALID OPERATION is generated. Fixes piglit nv_conditional_render-begin-zero. Reviewed-by: Brian Paul <[email protected]>
* mesa: Add support for Begin/EndConditionalRender in display lists.Eric Anholt2011-09-191-0/+45
| | | | | | Fixes piglit nv_conditional_render-dlist. Reviewed-by: Brian Paul <[email protected]>
* mesa: fix format/type check in unpack_image() for bitmapsBrian Paul2011-09-191-1/+1
| | | | | Passing type == GL_BITMAP returns 0 while error values return -1. This fixes glPolygonStipple being compiled into display lists.
* mesa: Advertise GL_OES_compressed_paletted_texture in OpenGL ES1.xIan Romanick2011-09-191-1/+1
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Remove redundant compressed paletted texture error checksIan Romanick2011-09-191-29/+5
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Refactor compressed texture error checks to work with paletted texturesIan Romanick2011-09-191-11/+70
| | | | | | | | | | | | | This code was really broken before. A lot of the error checks were done much later (too late), and some of the error checks would fail. The underlying problem is that Mesa doesn't ever keep compressed paletted textures in their original format. The textures are immediately converted to some RGB or RGBA format. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39991 Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Add _mesa_cpal_compressed_format_typeIan Romanick2011-09-192-0/+20
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Refactor expected texture size check in cpal_get_infoIan Romanick2011-09-192-13/+35
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_formatIan Romanick2011-09-191-0/+19
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>
* mesa: Add GL_OES_compressed_paletted_texture formats to ↵Ian Romanick2011-09-191-0/+13
| | | | | | | | _mesa_is_compressed_format Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Tested-by: Jin Yang <[email protected]>