summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965/fs: Add a couple more algebraic cases that help some ARB_fp patterns.Eric Anholt2012-10-081-0/+23
| | | | | | | ARB_fp doesn't go through the GLSL optimizer, and these were things you see frequently thanks to conditionals being lowered to SLT/SGE and MUL. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Pull ir_binop_min/ir_binop_max handling to a separate function.Eric Anholt2012-10-082-31/+23
| | | | | | | | | | | | | This will be reused from the ARB_fp compiler. I touched up the pre-gen6 path to not overwrite dst in the first instruction, which prevents the need for aliasing checks (we'll need that in the ARB_fp compiler, but it actually hasn't been needed in this codebase since the revert of the nasty old MOV-avoidance code). I also made the conditional_mod between gen6 and pre-gen6 consistent, which shouldn't matter except for denorm/(+/-)0 comparisons where the choice between left and right hand side of the comparison changes. Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Refactor rectangle/GL_CLAMP texture coordinate adjustment.Eric Anholt2012-10-082-21/+16
| | | | | | | | We'll want to reuse this for ARB_fp handling. v2: Fold the remaining bit of emit_texcoord back into visit(ir_texture). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Pass fragment depth to the fb write as a fs_reg, not an ir_variable.Eric Anholt2012-10-082-7/+4
| | | | | | This will be used for the ARB_fp change to use this backend. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Note that OPCODE_RFL is not part of ARB_fp (it's NV_fp only).Eric Anholt2012-10-081-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* st/wgl: Don't cache HDC anywhere.José Fonseca2012-10-084-11/+12
| | | | | | | | | Applications may destroy HDC at any time. So always get a HDC as needed. Fixes lack of presents with Solidworks eDrawings when screen resolution is changed. Reviewed-by: Brian Paul <[email protected]>
* meta: Make shader template literal strings be parameters to asprintfIan Romanick2012-10-071-25/+18
| | | | | | | | | | This enables the C compiler to generate warnings if the formats and the arguments don't match. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* meta: Always enable GL_EXT_texture_array in mipmap shaderIan Romanick2012-10-071-7/+2
| | | | | | | | | | | '#extension foo: enable' is harmless. The functionality is only actually enabled if the extension is supported. The shader won't use the functionality if it's not supported, so we're fine. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* meta: Since mipmap output type is always vec4, don't sprintf itIan Romanick2012-10-071-2/+2
| | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* meta: Don't use GLSL 1.30 shader on OpenGL ES 2Ian Romanick2012-10-071-1/+1
| | | | | | | | | | | Fixes GLES2 CoverageGL conformance test. NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* meta: Rearrange shader creation in setup_glsl_generate_mipmapIan Romanick2012-10-071-42/+43
| | | | | | | | | | | | | The diff looks weird, but this moves the code from the first 'if (ctx->Const.GLSLVersion < 130)' block down into the second block. It also moves some variable decalarations closer to their use. NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* meta: Remove unsafe global mem_ctx pointerIan Romanick2012-10-071-1/+1
| | | | | | | | | NOTE: This is a candidate for the 9.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* i915g: Call draw_set_mapped_vertex_buffer from draw_vboStéphane Marchesin2012-10-062-15/+17
| | | | This regressed with the draw rework. Fixes glest and vdrift crash.
* r600g: fix possible issue with stencil mipmap renderingMarek Olšák2012-10-061-1/+12
| | | | | | | Somehow I only hit this issue with my latest libdrm changes. This won't be needed with DB texturing. NOTE: This is a candidate for the 9.0 branch.
* r600g: ensure PERFECT_ZPASS+NOOP_CULL_DISABLE are 0 for blits+decompressionMarek Olšák2012-10-061-23/+22
| | | | | | | | When an occlusion query was active, the derived DB state wasn't changed for u_blitter even though all the occlusion queries were suspended. It's fixed by moving the state update into the emit functions, which are called whenever queries are stopped or suspended.
* r600g: don't modify pipe_resource in resource_copy_region, fixing race conditionMarek Olšák2012-10-065-161/+139
| | | | | | pipe_resource can be shared between contexts, we shouldn't modify its description. Instead, let's use the resource "views" (sampler views and surfaces), where we can freely change almost any property of a resource.
* r600g: fix streamout on RS780 and RS880Marek Olšák2012-10-062-7/+14
| | | | | The latest kernel from git is required. Transform feedback (along with GL3.0) is turned off on older kernels.
* gallium: allow debug helpers in the release buildMarek Olšák2012-10-061-8/+0
| | | | | | | No idea why this is #ifdef'd. Trace and Noop are definitely useful no matter how Mesa is built. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove the driverCtx parameter to _mesa_create/initialize_context()Brian Paul2012-10-0510-21/+13
| | | | No longer used.
* mesa: remove unused gl_context::DriverCtx fieldBrian Paul2012-10-053-4/+0
|
* radeon/r200: remove use of gl_context::DriverCtx fieldBrian Paul2012-10-054-8/+16
|
* radeon/r200: make radeon_context subclass of gl_contextBrian Paul2012-10-0527-105/+106
| | | | | radeon_context now contains a gl_context, rather than a pointer to one. This will allow some minor core Mesa clean-up.
* mesa: Flag _NEW_VARYING_VP_INPUTS when TexEnv programs are active.Kenneth Graunke2012-10-051-1/+2
| | | | | | | | | | | | | | | | | The idea here is to not flag _NEW_VARYING_VP_INPUTS when shaders (either GLSL or ARB vp/fp) are in use. If either TNL or TexEnv programs are active, at least one stage is using fixed function. On Pineview, fixes 20 Piglit, 60 oglconforms, and 7 ES 1.1 conformance tests, as well as missing textures in Xonotic. These were all regressions since commit fb4a34e60eb4c1bdc7b0fdcd98d1bf3038c354e8. NOTE: This is a candidate for the 9.0 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49127 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54807 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i915g: Get rid of the fixup state functions.Stéphane Marchesin2012-10-053-48/+0
| | | | Now that the saved_* state is gone, we don't need those any longer.
* i915g: Remove the i915_context->saved_* stuff.Stéphane Marchesin2012-10-053-46/+23
| | | | | | | | | When using u_blitter, the state was being saved from saved_*, but we don't use that. So after u_blitter resumed we got some corrupted state in. So let's just remove the saved_* stuff. I thought it was weird but harmless, it's actually broken.
* i915g: Don't update I915_HW_PROGRAM in update_framebufferStéphane Marchesin2012-10-051-2/+2
| | | | It's already going to be updated in update_dst_buf_vars.
* Revert "i915g: Don't bind 0-length programs"Stéphane Marchesin2012-10-051-8/+2
| | | | This reverts commit 8c28a9bd733f5b51ab459c6bc626a5aaac5a6c0c.
* glapi: Do not use backtrace on Cygwin.Vinson Lee2012-10-041-1/+1
| | | | | | | execinfo.h is not available on Cygwin. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: don't enable glVertexPointer() when using API_OPENGLES2.Paul Berry2012-10-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This function is only present in GLES1 and in the OpenGL compatibility profile. Fixes the following "make check" failure: [----------] 1 test from DispatchSanity_test [ RUN ] DispatchSanity_test.GLES2 Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable dispatch_sanity.cpp:122: Failure Value of: table[i] Actual: 0x4de54e Expected: (_glapi_proc) _mesa_generic_nop Which is: 0x41af72 i = 321 [ FAILED ] DispatchSanity_test.GLES2 (4 ms) [----------] 1 test from DispatchSanity_test (4 ms total) NOTE: This is a candidate for stable release branches. Reviewed-by: Oliver McFadden <[email protected]> Tested-by: Oliver McFadden <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i915g: Don't bind 0-length programsStéphane Marchesin2012-10-041-2/+8
| | | | | | | | Since we started doing fixups for different render target formats, this has been an issue. Instead just don't do anything, when the program gets emitted later it'll get the correct fixup. Fixes a bunch of piglit tests.
* mesa: don't call TexImage driver hooks for zero-sized imagesBrian Paul2012-10-041-7/+9
| | | | | | | This simply avoids some failed assertions but there's no reason to call the driver hooks for storing a tex image if its size is zero. Note: This is a candidate for the stable branches.
* intel: Fix intel_texsubimage_tiled_memcpy to skip GL_EXT_unpack_subimage caseRob Bradford2012-10-031-1/+4
| | | | | | | | | 413c49141 added an optimisation to improve the performance of teximage under a limited set of circumstances. If GL_EXT_unpack_subimage has been used then we we must also skip this optimisation since the optimised codepath does not take the packing values into consideration. Reviewed-by: Chad Versace <[email protected]>
* dri drivers: Link dricommon before dynamic librariesMatt Turner2012-10-035-10/+10
| | | | | | | | | I think libtool should be handling this for us, but the build fails for Jordan because libdricommon (a static library, which uses expat) appears before -lexpat on the linker command. Reviewed-by: Jordan Justen <[email protected]> Tested-by: Jordan Justen <[email protected]>
* register_allocate: don't consider trivially colorable registers for spilling.Paul Berry2012-10-031-0/+7
| | | | | | | | | | | | | | | | | Previously, we considered all registers as candidates for spilling. This was counterproductive--for any registers that have already been removed from the interference graph, there is no benefit to spilling them, since they don't contribute to register pressure. This patch ensures that we will only try to spill registers that are still in the interference graph after register allocation has failed. This is consistent with the recommendations of the paper "Retargetable Graph-Coloring Register Allocation for Irregular Architectures", on which our register allocator is based. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glx/dri2: use uint64_t instead of double to represent time for FPS calculationMarek Olšák2012-10-031-5/+6
| | | | | | | | | | | | Wine or a windows app changes fpucw to 0x7f, causing doubles to be equivalent to floats, which broke the calculation of FPS. We should be very careful about using doubles in Mesa. Henri Verbeet adds: For reference, this is done by for example d3d9 when a D3D device is created without D3DCREATE_FPU_PRESERVE set. In the general case applications can do all kinds of terrible things to the FPU control word of course.
* mesa: tests: EnumStrings.LookUpByNumberOliver McFadden2012-10-031-2/+2
| | | | | | | | | | | | | | | | | | [ RUN ] EnumStrings.LookUpByNumber enum_strings.cpp:43: Failure Value of: _mesa_lookup_enum_by_nr(everything[i].value) Actual: "GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE" Expected: everything[i].name Which is: "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT" enum_strings.cpp:43: Failure Value of: _mesa_lookup_enum_by_nr(everything[i].value) Actual: "GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE" Expected: everything[i].name Which is: "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT" [ FAILED ] EnumStrings.LookUpByNumber (2 ms) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55505 Signed-off-by: Oliver McFadden <[email protected]>
* docs: add link to the GLSL compiler pageAndreas Boll2012-10-031-0/+1
| | | | | | This reverts commit 9e0931e355a21ff9902a4127cc63b392d8def0cd Reviewed-by: Brian Paul <[email protected]>
* docs: update shading documentationAndreas Boll2012-10-031-8/+5
| | | | Reviewed-by: Brian Paul <[email protected]>
* build: Remove autoconf check for signbitMatt Turner2012-10-021-7/+0
| | | | rebase failure in 7da12426f7682ffc44ae40e31d1b5712521fbb70.
* i915g: Implement srgb textures the easy way.Stéphane Marchesin2012-10-023-102/+9
| | | | | Since the hw can do it, let's use the hw. It's less accurate but doesn't have the shader instruction count shortcomings.
* i915g: Use X tiling for texturesStéphane Marchesin2012-10-021-7/+2
| | | | | This is what the classic driver does, and it allows faster texture uploads.
* SwapBuffersRegionNOK: invert rectangles on y axisRobert Bragg2012-10-021-2/+1
| | | | | | | | | | | The EGL_NOK_swap_region2 spec states that the rectangles are specified with a bottom-left origin within a surface coordinate space also with a bottom left origin, so this patch ensures the rectangles are flipped before passing them on to dri2_copy_region. Fixes piglit's egl-nok-swap-region test. Tested-by: Matt Turner <[email protected]>
* mesa: remove bogus compressed texture size checksBrian Paul2012-10-022-28/+0
| | | | | | | | | | | | | | A compressed texture image size doesn't have to be a multiple of the compressed block size (only sub-images do). Fixes issues when building compressed mipmaps because we often wind up with non-block-size images for the higher mipmap levels. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=55445 Note: This is a candidate for the stable branches. Reviewed-by: Eric Anholt <[email protected]> Tested-by: Sven Arvidsson <[email protected]>
* radeonsi: Fix double compilation of shader variants.Michel Dänzer2012-10-022-6/+4
| | | | | | | Fixes crash in piglit glsl-max-varyings. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: Better indexing of parameters in the pixel shader.Michel Dänzer2012-10-023-8/+12
| | | | | | | | | | | We were previously using the TGSI input index, which can exceed the number of parameters passed from the vertex shader via the parameter cache. Now we use a separate index which only counts those parameters. Prevents piglit regressions with the following fix. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeon/llvm: Disable SI flow control again for now.Michel Dänzer2012-10-021-1/+2
| | | | | | | It makes piglit unreliable due to VM protection faults and GPU lockups. Signed-off-by: Michel Dänzer <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* docs/helpwanted: cleanup todo list linksAndreas Boll2012-10-021-14/+24
| | | | | | | split into common and driver specific To-Do lists add an explanation for each To-Do list Reviewed-by: Brian Paul <[email protected]>
* docs: document how to apply a candidate to a stable branchAndreas Boll2012-10-021-0/+8
| | | | Reviewed-by: Brian Paul <[email protected]>
* docs: document how to mark a candidate for a stable branchAndreas Boll2012-10-021-0/+16
| | | | Reviewed-by: Brian Paul <[email protected]>
* android: glcpp: fix abuse of yylexNegreanu Marius Adrian2012-10-022-6/+6
| | | | | | | | | | | | | | Port the 'glcpp: fix abuse of yylex' commit to Android.mk Also, since the Android.*.mk are sourced in a global namespace, the local-y-to-c-and-h is prefixed with the LOCAL_MODULE name, The initial fix commit is 53d46bc787318ccf9911fdd1d5fe99ee4db7f41a There's also a bugzilla for this: 54947 Signed-off-by: Negreanu Marius Adrian <[email protected]> Reviewed-by: Oliver McFadden <[email protected]> Reviewed-by: Dave Airlie <[email protected]>