summaryrefslogtreecommitdiffstats
path: root/src/mesa
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Kill ES2 wrapper functionsIan Romanick2012-08-299-166/+226
| | | | | | | | | v2: Fix completely broken condition around ClearColorIiEXT and ClearColorIuiEXT. v3: Add special VertexAttrib handling for ES2. Signed-off-by: Ian Romanick <[email protected]>
* mesa: glGetVertexAttribPointerv is part of core profile and ES2Ian Romanick2012-08-291-1/+1
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glPointParameter pname in Mesa code rather than the ES wrapperIan Romanick2012-08-293-25/+1
| | | | | | | v2: Add proper core-profile filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Require OpenGL 2.0 for GL_POINT_SPRITE_COORD_ORIGINIan Romanick2012-08-291-5/+4
| | | | | | | The comment in the code even says this is the right thing to do. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Require that drivers supporting point sprites support point parametersIan Romanick2012-08-291-60/+46
| | | | | | | | All drivers in Mesa do. This allows a lot of extension checking code to be gutted from the function. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Validate glGetTexEnv parameters in Mesa code rather than the ES wrapperIan Romanick2012-08-292-87/+5
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glTexEnv parameters in Mesa code rather than the ES wrapperIan Romanick2012-08-293-329/+43
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetTexGen parameters in Mesa code rather than the ES wrapperIan Romanick2012-08-294-62/+22
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glTexGen parameters in Mesa code rather than the ES wrapperIan Romanick2012-08-293-128/+39
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glLightModel pname in Mesa code rather than the ES wrapperIan Romanick2012-08-293-35/+11
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glMaterial face and pname in Mesa code rather than the ES ↵Ian Romanick2012-08-293-34/+11
| | | | | | wrapper Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetMaterial pname in Mesa code rather than the ES wrapperIan Romanick2012-08-293-21/+6
| | | | | | | | Fixes a bug that glGetMaterial[fx]v in ES1 contexts would (try to) allow queries of GL_AMBIENT_AND_DIFFUSE. This enum can only be used in glMaterial, not in the get. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetPointerv pname in Mesa code rather than the ES wrapperIan Romanick2012-08-292-12/+33
| | | | | | v2: Add proper core-profile, GLES1, and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glMatrixMode mode in Mesa code rather than the ES wrapperIan Romanick2012-08-292-10/+4
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glFog pname in Mesa code rather than the ES wrapperIan Romanick2012-08-293-54/+12
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glReadPixels format and type in Mesa code rather than the ↵Ian Romanick2012-08-292-53/+33
| | | | | | | | ES wrapper v2: Add proper GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glPixelStore pname in Mesa code rather than the ES wrapperIan Romanick2012-08-292-29/+37
| | | | | | v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glEnable cap in Mesa code rather than the ES wrapperIan Romanick2012-08-292-183/+296
| | | | | | | | | Also handle glDisable, glIsEnabled, glEnableClientState, and glDisableClientState. v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glHint target in Mesa code rather than the ES wrapperIan Romanick2012-08-292-19/+25
| | | | | | v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetVertexAttribf pname in Mesa code rather than the ES ↵Ian Romanick2012-08-292-19/+12
| | | | | | | | | | | wrapper v2: Add proper core-profile and GLES3 filtering. v3: Allow glGetVertexAttribfv(0, GL_CURRENT_VERTEX_ATTRIB_ARB, param) in OpenGL 3.1, just like OpenGL ES 2.0. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetString pname in Mesa code rather than the ES wrapperIan Romanick2012-08-292-15/+12
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate primitive modes in Mesa code rather than the ES wrapperIan Romanick2012-08-292-42/+5
| | | | | | v2: Add proper core-profile filtering. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Refactor _mesa_valid_prim_mode to use a switch-statementIan Romanick2012-08-291-5/+27
| | | | | | This makes the next change a bit easier. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate blend function enums in Mesa code rather than the ES wrapperIan Romanick2012-08-292-115/+11
| | | | | | | | | v2: Add proper core-profile filtering. v3: Allow GL_SRC_ALPHA_SATURATE as a destination factor in GLES3. Based on review feedback from Eric Anholt. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glClear mask in Mesa code rather than the ES wrapperIan Romanick2012-08-292-11/+9
|
* mesa/es: Validate glRenderbufferStorage internalFormat in Mesa code rather ↵Ian Romanick2012-08-292-90/+132
| | | | | | | | | | | | | | than the ES wrapper v2: Add proper core-profile and GLES3 filtering. v3: Allow GL_RGB10_A2UI in GLES3 based on review feedback from Eric Anholt. v4: Arg. Reject unsized RED and RG enums on GLES. More feedback from Eric. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGetRenderbufferParameter pname in Mesa code rather than ↵Ian Romanick2012-08-292-29/+2
| | | | | | | | | the ES wrapper v2: Add proper core-profile and GLES3 filtering. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/es: Validate glGetFramebufferAttachmentParameter pname in Mesa code ↵Ian Romanick2012-08-292-42/+29
| | | | | | | | | | | | rather than the ES wrapper v2: Add proper core-profile, GLES1, and GLES3 filtering. v3: Fix the GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME query when the attachment type is GL_NONE on GLES3. Other cleanups. Based on review feedback from Eric Anholt. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glGenerateMipmap target in Mesa code rather than the ES ↵Ian Romanick2012-08-292-9/+9
| | | | | | | | | | | | | | | wrapper v2: Add proper core-profile and GLES3 filtering. v3: Fix a typo in GL_TEXTURE_2D_ARRAY checking. v4: Change !_mesa_is_desktop_gl tests to _mesa_is_gles test. The test around GL_TEXTURE_2D_ARRAY got some other changes because that enum is also available with GLES3 (which uses API_OPENGLES2). Based on review feedback from Eric Anholt. Signed-off-by: Ian Romanick <[email protected]>
* mesa/es: Validate glFramebufferTexture2D textarget in Mesa code rather than ↵Ian Romanick2012-08-292-18/+4
| | | | | | | | | | | | | the ES wrapper v2: Add proper core-profile and GLES3 filtering. v3: Change !_mesa_is_desktop_gl tests to _mesa_is_gles test. The test around GL_TEXTURE_2D_ARRAY got some other changes because that enum is also available with GLES3 (which uses API_OPENGLES2). Based on review feedback from Eric Anholt. Signed-off-by: Ian Romanick <[email protected]>
* meta: Add GLSL variant of _mesa_meta_GenerateMipmap() functionAnuj Phogat2012-08-291-58/+220
| | | | | | | | | | | | | | | | This reduces the overhead of using the fixed function internally in the driver. V2: Use setup_glsl_generate_mipmap() and setup_ff_generate_mipmap() functions to avoid code duplication. Use glsl version when ARB_{vertex, fragmet}_shader are present. Remove redundant code. V3: Remove redundant border related code leaving the assertion. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: convert a few more macros to inline functionsBrian Paul2012-08-291-22/+21
|
* mesa: remove COPY_4V_CAST() macroBrian Paul2012-08-292-10/+1
| | | | Only used in one place, and not really needed.
* mesa: convert a bunch of math macros to inline functionsBrian Paul2012-08-291-56/+86
|
* tnl: use INTERP_4F() instead of four INTERP_F() callsBrian Paul2012-08-291-4/+1
|
* swrast: fix wrong assignments in _swrast_add_spec_terms_line()Brian Paul2012-08-291-2/+2
|
* mesa: test for GL_EXT_framebuffer_sRGB in glPopAttrib()Brian Paul2012-08-291-1/+2
| | | | To avoid spurious GL_INVALID_ENUM errors if the extension isn't supported.
* mesa: Define CPU_TO_LE32 to work on OpenBSDMartin Pieuchot2012-08-291-0/+3
| | | | Signed-off-by: Brian Paul <[email protected]>
* i965: Disable the swrast context setup on GL 3.1 core.Eric Anholt2012-08-283-15/+34
| | | | | | | | | | | | | | I've reviewed the code, and the swrast callsites remaining are all in drawpixels/copypixels/bitmap/accum, or _swrast_BlitFramebuffer that shouldn't be hit. A piglit run with the context setup disabled on legacy GL and GLES2 showed regressions only in the copypixels and drawpixels tests. If the context type is forced, this reduces the shader_runner maximum heap size for glsl-algebraic-add-add-1.shader_test from 15,137,496b to 4,165,376b. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Replace general sw fallback support with a manual check for rendermode.Eric Anholt2012-08-285-120/+14
| | | | | | | There were no other cases that set it any more. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* intel: Move RenderMode fallback func to i915 driver.Eric Anholt2012-08-285-18/+20
| | | | | | | | The Fallback field of the context struct doesn't work that way on i965, and it's the only caller of FALLBACK() in the driver. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Drop the old sw fallback for position array being disabled.Eric Anholt2012-08-281-7/+0
| | | | | | | | | This code has been in the driver since the first commit. I think it was trying to stop rendering from happening with a disabled position array. Core mesa has since had changes to deal with disabled position arrays correctly. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Drop support for forcing drawing through sw fallbacks.Eric Anholt2012-08-282-5/+2
| | | | | | | It turns out it hasn't worked since at least 8.0. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Move depth resolve for span fallbacks to a simpler place.Eric Anholt2012-08-282-28/+3
| | | | | Reviewed-by: Chad Versace <[email protected]> Acked-by: Ian Romanick <[email protected]>
* i965: Drop manual hiz resolves in span rendering.Eric Anholt2012-08-281-10/+0
| | | | | | | | swrast uses MapRenderbuffer, which leads to intel_miptree_map, which does the depth resolve. Reviewed-by: Chad Versace <[email protected]> Acked-by: Ian Romanick <[email protected]>
* i965: Make VS programs obey the shader_precompile driconf option.Kenneth Graunke2012-08-271-1/+1
| | | | | | | | Now that it's on by default, we may as well make it obey the flag, for consistency's sake if nothing else. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Reenable the fragment shader precompile.Kenneth Graunke2012-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Precompiling the shader at link time often allows us to avoid compiling it at the first use. This moves the expensive compilation and optimization process to game or level load time, rather than at draw time, where we really can't avoid any cycles and don't want to risk stalling the GPU. The downside is that we have to guess the non-orthagonal state the program will have set when it draws with the shader. Previously, we guessed wrong for nearly every shader, so it wasn't useful. With the recent SamplerUnits rework and this series, we've either eliminated state or made smarter guesses, and usually get it right now. In the L4D2 time demo, I now have 39 fragment shader recompiles and no vertex shader recompiles. Before this series and the SamplerUnits rework, I had 206 fragment shader recompiles and 192 vertex shader recompiles. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Set swizzle fields in the VS precompile program key.Kenneth Graunke2012-08-271-0/+11
| | | | | | | | | | | | | | | | | This fixes a regression since 76d1301e8e8e50dc962601a9977bc52148798349: I began setting SWIZZLE_XYZW for unused sampler units in the actual program keys, since this matched the FS precompile behavior. However, the VS precompile was expecting zero, so that commit made essentially every vertex shader (even those not using texturing) mismatch and need to be recompiled. Setting them in the VS precompile key solves the issue. It also is an improvement over our old behavior: previously we guessed that vertex shaders didn't use any textures at all. Now we actually look to see if the VS had any sampler uniforms and guess based on that. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/vs: Add VS program key dumping to INTEL_DEBUG=perf.Kenneth Graunke2012-08-273-1/+76
| | | | | | | Eric added support for WM key debugging. This adds it for the VS. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965/fs: Assume shadow sampler swizzling is <X, X, X, 1>.Kenneth Graunke2012-08-271-2/+8
| | | | | | | | | | | | | | | | Our previous assumption, SWIZZLE_XYZW, was completely bogus for depth textures. There are no Y, Z, or W components. DEPTH_TEXTURE_MODE has three options: - GL_LUMINANCE: <X, X, X, 1> - GL_INTENSITY: <X, X, X, X> - GL_ALPHA: <0, 0, 0, X> The default value is GL_LUMINANCE, and most applications don't seem to alter DEPTH_TEXTURE_MODE. Make that our precompile guess. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>