summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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]>
* radeon/llvm: Fix encoding of FP immediates on SITom Stellard2012-08-291-1/+6
|
* radeon/llvm: Create a register class for the M0 registerTom Stellard2012-08-295-16/+24
| | | | | | | | | | | The Common Subexpression Elimination pass will not operate on instructions with physical register defs, so we end up with several redundant copies to M0 when using interpolation. Adding a register class that only contains the M0 register allows use to use a virtual register to represent M0, and makes it possible for the Common Subexpression Elimination pass to remove the extra copies.
* radeon/llvm: Set the neverHasSideEffects bit on more instructionsTom Stellard2012-08-291-0/+2
| | | | | This flag makes these instructions candidates for the dead code elimination and common subexpression elimination.
* radeon/llvm: Declare the interpolation intrinsics as ReadOnlyTom Stellard2012-08-293-3/+4
| | | | | This signals to the Dead Code Elimination pass that it is safe to remove these instructions when they are dead.
* radeon/llvm: Mark M0 as a def when lowering interpolation instructionsTom Stellard2012-08-291-4/+2
|
* 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]>
* glsl: s/class/struct/ for ast_type_qualifierBrian Paul2012-08-291-1/+1
| | | | | | To silence an MSVC compiler warning about class vs. struct. Reviewed-by: Kenneth Graunke <[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]>
* radeon/llvm: Handle TGSI KIL opcode for SI.Michel Dänzer2012-08-283-0/+44
| | | | | | | Fixes piglit fp-kil and glBitmap() with radeonsi. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeon/llvm: Basic support for SI EXEC register.Michel Dänzer2012-08-283-2/+23
| | | | | Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: Don't write to the PA_SC_RASTER_CONFIG register.Michel Dänzer2012-08-281-1/+0
| | | | | | | It should be initialized by the kernel as necessary. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]>
* r600g: fix relative addressing on RS780 and RS880Marek Olšák2012-08-281-7/+6
| | | | | | They should be treated like RV670. Tested-by: Michel Dänzer <[email protected]>
* llvmpipe: Bump the maximum texture size (in pixels).José Fonseca2012-08-282-2/+9
| | | | | | | | | | But cap the size in bytes, to avoid depleting the whole system memory, with humongus textures. Tested with max-texture-size piglit test. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* u_vbuf: avoid unnecessary update of the vertex elementsVadim Girlin2012-08-281-1/+3
| | | | | Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: fix invalid flag detection for EGL_KHR_create_contextMatt Turner2012-08-271-1/+1
| | | | | | | | We want to check whether there are bits set outside of the valid flags. Fixes piglit test egl-create-context-invalid-flag-gl Reviewed-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]>
* i965: Index sampler program key data by linker-assigned index.Kenneth Graunke2012-08-276-30/+30
| | | | | | | | | Now that most things are based on the linker-assigned index, it makes sense to convert the arrays in the VS/WM program key as well. It seems silly to leave them indexed by texture unit. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Only set proj_attrib_mask for fixed function.Kenneth Graunke2012-08-272-2/+12
| | | | | | | | | | | | | | brw_wm_prog_key's proj_attrib_mask field is designed to enable an optimization for fixed-function programs, letting us avoid projecting attributes where the divisor is 1.0. However, for shaders, this is not useful, and is pretty much impossible to guess when building the FS precompile key. Turning it off for shaders should allow the precompile to work and not lose much. Signed-off-by: Kenneth Graunke <[email protected]> Suggested-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]>