summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ir_to_mesa: Don't set initial uniform values againIan Romanick2012-05-231-104/+0
| | | | | | | | | This work is now done by the linker, so we don't need to keep doing it here. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* ir_to_mesa: Propagate initial values in _mesa_associate_uniform_storageIan Romanick2012-05-231-0/+9
| | | | | | | | | The linker may have set initial values for uniforms. Propagate these values to the driver's backing storage when it is first associated. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Propagate sampler uniform initializers to gl_shader_program::SamplerUnitsIan Romanick2012-05-231-0/+9
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Initialize samplers to 0, propagate sampler values to the gl_programIan Romanick2012-05-232-3/+11
| | | | | | | | | | | | | The spec requires that samplers be initialized to 0. Since this differs from the 1-to-1 mapping of samplers to texture units assumed by ARB assembly shaders (and the gl_program structure), be sure to propagate this date from the gl_shader_program to the gl_program. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> CC: Vadim Girlin <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49088
* glsl: Set initial values for uniforms in the linkerIan Romanick2012-05-234-0/+178
| | | | | | | | | | | | | | v2: Fix handling of arrays-of-structure. Thanks to Eric Anholt for pointing this out. v3: Minor comment change based on feedback from Ken. Fixes piglit glsl-1.20/execution/uniform-initializer/fs-structure-array and glsl-1.20/execution/uniform-initializer/vs-structure-array. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen6+: Add support for GL_ARB_blend_func_extended.Eric Anholt2012-05-2313-8/+112
| | | | | | | v2: Add support for gen6, and don't turn it on if blending is disabled. (fixes GPU hang), and note it in docs/GL3.txt Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Keep a computed value for dual source blend func with each buffer.Eric Anholt2012-05-233-17/+32
| | | | | | | | | The i965 driver needed this as well for hardware setup, so instead of duplicating the logic, just save it off. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* i965/gen6+: Add support for fast depth clears.Eric Anholt2012-05-238-12/+150
| | | | | | | | | | Improves citybench high-res performance 3.0% +- 0.4%, n=10. Improves Lightsmark 1024x768 performance 0.74% +/- 0.20% (n=78). No significant difference on openarena (n=5, didn't fast clear) or nexuiz (n=3). Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/gen6: Add CC viewport state setup to blorp code.Eric Anholt2012-05-231-0/+26
| | | | | | | | While it doesn't have the same warning in the simulator as in gen7, let's emit it out of paranoia. We wouldn't want our resolves of some previous clear to get clamped to some current clamping value. Suggested-by: pretty much everyone
* i965/gen7: Add CC viewport setup to blorp code.Eric Anholt2012-05-231-0/+21
| | | | | | | | | | | | | | | When doing fast clears, a fulsim warning said that the batch was being emitted without the viewport set up. While the fast clear pass I was looking at doesn't use the clear value, the later resolves which also didn't set up the vieport would trigger the same. It's not obvious from the error message whether it meant "fast clear value gets clamped to something you haven't defined" or "fast clear value doesn't get clamped, and I saw it was out of the current (uninitialized) range, and you probably wanted it clamped to that (uninitialized) range". Be paranoid and assume the first case. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Drop a layer of indirection in doing HiZ resolves.Eric Anholt2012-05-237-120/+9
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Replace intel_need_resolve with the hiz ops it maps to.Eric Anholt2012-05-233-17/+21
| | | | | | | | Having this enum separate caused us to need a bunch of helper functions to translate to the op to be executed. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Add an interface for doing hiz ops from C code.Eric Anholt2012-05-234-15/+44
| | | | | | | | This required moving gen6_hiz_op, and I put it in intel_resolve_map.h for the next commit. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Rename the clear function for this driver.Eric Anholt2012-05-231-2/+2
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Simplify the remaining clear logic by relying on the meta clear.Eric Anholt2012-05-231-47/+11
| | | | | | | | The GLSL clear path doesn't need any buffer presence checks, since those are already handled in the normal drawing path code. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Switch blit color clears to tri clears on gen4/5.Eric Anholt2012-05-231-28/+2
| | | | | | | | | | | | | | Our understanding is that the 3D engine is supposed to be faster anyway. We used to have more overhead in our tri clear path than we do today, which would have led to this choice. But given that we almost always see a depth clear along with a color clear, the path was hardly exercised anyway. Also, the color mask logic was broken in the presence of GL_EXT_draw_buffers2's per-buffer colormask. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: Remove dead logic for non-tri depth/stencil clears.Eric Anholt2012-05-231-26/+2
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965: We always have GLSL, so always use it for tri clears.Eric Anholt2012-05-231-4/+1
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i915: Drop gen4+ code from the forked clear code.Eric Anholt2012-05-231-10/+1
| | | | | Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* intel: Fork the intel_clear.c file between i915 and i965.Eric Anholt2012-05-234-8/+209
| | | | | | | | This logic is wasted on i965 when we want to just always do GLSL tri clears. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* st/mesa: set stObj->lastLevel in guess_and_alloc_textureVadim Girlin2012-05-231-0/+2
| | | | | | | | | | Fixes lockups/asserts with depthstencil-render-miplevels tests and r600g. Should also fix https://bugs.freedesktop.org/show_bug.cgi?id=50033 NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: Completely annotate the batch bo when aub dumping.Paul Berry2012-05-226-27/+117
| | | | | | | | | | | | | | | | | | | Previously, when the environment variable INTEL_DEBUG=aub was set, mesa would simply instruct DRM to start dumping data to an .aub file, but we would not provide DRM with any information about the format of the data in various buffers. As a result, a lot of the data in the generate .aub file would be unannotated, making further data analysis difficult. This patch causes the entire contents of each batch buffer to be annotated using the data in brw->state_batch_list (which was previously used only to annotate the output of INTEL_DEBUG=bat). This includes data that was allocated by brw_state_batch, such as binding tables, surface and sampler states, depth/stencil state, and so on. The new annotation mechanism requires DRM version 2.4.34. Reviewed-by: Eric Anholt <[email protected]>
* intel: When AUB dumping, flush before emitting final bitmap command.Paul Berry2012-05-221-1/+3
| | | | | | | | | | | | | When we are generating an AUB dump, we make a final call to aub_dump_bmp() as the context is being destroyed, to ensure that any rendering performed before the application exits can be seen during a simulation run. However, we were doing this before flushing the batch buffer; as a result simulation runs would not always see the effect of all rendering commands. This patch flushes the batch buffer just before making the final call to aub_dump_bmp(), to ensure that all rendering is properly captured in the final bitmap.
* llvmpipe: Fix alpha testing precision on rgba8 formats.José Fonseca2012-05-223-1/+34
| | | | | | | | | | This is a long standing problem, that recently surfaced with the change to enable perspective correct color interpolation. A fix for all possible formats is left to the future. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* scons: Do not build glx and egl on Cygwin.Vinson Lee2012-05-222-3/+3
| | | | | Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* nv30: check for NULL vertex buffers in prevalidate_vbufsChristoph Bumiller2012-05-221-1/+1
|
* nv50: make unaligned index buffer offsets work againChristoph Bumiller2012-05-221-1/+3
| | | | Messed up in ef7bb281292c17b762b57779306e874704c87328.
* nvc0: don't set NEW_IDXBUF in nvc0_switch_pipe_context if none is boundChristoph Bumiller2012-05-221-0/+2
|
* llvmpipe: Added a error counter to lp_test_conv.James Benton2012-05-211-3/+7
| | | | | | Useful for keeping track of progress when fixing errors! Signed-off-by: José Fonseca <[email protected]>
* llvmpipe: Changed known failures in lp_test_conv.James Benton2012-05-211-3/+9
| | | | | | To comply with the recent fixes to lp_bld_conv. Signed-off-by: José Fonseca <[email protected]>
* llvmpipe: Added fixed point types tests to lp_test_conv.James Benton2012-05-211-6/+7
| | | | Signed-off-by: José Fonseca <[email protected]>
* gallivm: Fixed erroneous optimisation in lp_build_min/max.James Benton2012-05-211-7/+14
| | | | | | | | Previously assumed normalised was 0 to 1, but it can be -1 to 1 if type is signed. Tested with lp_test_conv and lp_test_format, reduced errors. Signed-off-by: José Fonseca <[email protected]>
* gallivm: Compensate for lp_const_offset in lp_build_conv.James Benton2012-05-211-4/+31
| | | | | | | Fixing a /*FIXME*/ to remove errors in integer conversion in lp_build_conv. Tested using lp_test_conv and lp_test_format, reduced errors. Signed-off-by: José Fonseca <[email protected]>
* gallivm: Fixed overflow in lp_build_clamped_float_to_unsigned_norm.James Benton2012-05-211-1/+1
| | | | | | Tested with lp_test_conv and lp_test_format, reduced errors. Signed-off-by: José Fonseca <[email protected]>
* glu: fix two Clang warningsLukas Rössler2012-05-212-2/+2
| | | | | | | | | | | | | This patch removes two Clang warnings in GLU: The first one seems to be an actual bug in mapdesc.cc: Clang complains that sizeof(dest) will return the size of REAL*[MAXCOORDS], instead of the intended REAL[MAXCOORDS][MAXCOORDS]. The second one is just cosmetic because Clang doesn't like extra parentheses. NOTE: This is a candidate for the 8.0 branch Reviewed-by: Brian Paul <[email protected]>
* radeon/llvm: Handle selectcc DAG nodeTom Stellard2012-05-207-54/+350
| | | | | R600 can now select instructions from the selectcc DAG node, which is typically lowered to one of the SET* instructions.
* st/mesa: use pipe_sampler_view_release() in st_destroy_context_priv()Brian Paul2012-05-191-1/+1
| | | | | | | | Fixes another case of sampler views being created by one context, shared by another, then deleted by the first, leaving a dangling pipe context pointer. Reviewed-by: José Fonseca <[email protected]>
* mesa: use F_TO_I() instead of IROUND()Brian Paul2012-05-194-130/+130
| | | | | | | | Use it where performance matters more and the exact method of float->int conversion/rounding isn't terribly important. There should no net change here since F_TO_I() is the new name of the old IROUND() function. Reviewed-by: José Fonseca <[email protected]>
* mesa: reimplement IROUND(), add F_TO_I()Brian Paul2012-05-191-21/+36
| | | | | | | | | | | | | | The different implementations of IROUND() behaved differently and in the case of fistp, depended on the current x86 FPU rounding mode. This caused some tests like piglit roundmode-pixelstore and roundmode-getintegerv to fail on 32-bit x86 but pass on 64-bit x86. Now IROUND() always rounds to the nearest integer (away from zero). The new F_TO_I function converts a float to an int by whatever means is fastest. We'll use this where we're more concerned with performance and not too worried to how the conversion is done. Reviewed-by: José Fonseca <[email protected]>
* mesa: fix Z32_FLOAT -> uint conversion functionsBrian Paul2012-05-191-2/+2
| | | | | | | | The IROUND converted all arguments to 0 or 1. That's not what we wanted. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* st/mesa: remove unused pipe variableBrian Paul2012-05-191-1/+0
|
* svga: whitespace, comments, formatting clean-upsBrian Paul2012-05-191-38/+31
|
* st/mesa: added st_print_current_vertex_program(), for debuggingBrian Paul2012-05-192-0/+27
|
* svga: return PIPE_OK instead of 0Brian Paul2012-05-195-11/+11
| | | | And fix the emit_rss() function's return type.
* svga: fix zero-stride vertex array bugBrian Paul2012-05-191-2/+6
| | | | | | | | | | | | | | For zero-stride vertex arrays, the svga driver copies the value into the constant value and uses that value in the shader. The recent gallium-userbuf changes caused a regression in this. An example symptom was per-primitive glColor3f() calls getting ignored. Where we copied the vertex value from the vertex buffer to the constant buffer we neglected to take into account the pipe_vertex_buffer::buffer_offset field. Adding that value to the source offset fixes the problem. Actually, it looks like we should have been doing this all along, but it never was an issue before for some reason.
* mesa: add GLSL_REPORT_ERRORS debug flagBrian Paul2012-05-192-0/+15
| | | | | | | If the MESA_GLSL env var contains "errors", GLSL compilation and link errors will be reported to stderr. Reviewed-by: Ian Romanick <[email protected]>
* mesa: add some comments on shaderapi.c functionsBrian Paul2012-05-191-1/+14
|
* mesa: Remove undefinition of _P symbol.Vinson Lee2012-05-181-6/+0
| | | | | | | IRIX isn't used anymore. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* darwin: Address a build failure on Leopard and earlier OS versionsJeremy Huddleston2012-05-181-0/+10
| | | | | | | <https://trac.macports.org/ticket/34499> Regression-from: 51691f0767f6a75a1f549cd979a878a0ad12a228 Signed-off-by: Jeremy Huddleston <[email protected]>
* radeonsi: Only honour point related rasterizer state when rendering points.Michel Dänzer2012-05-181-2/+3
| | | | Avoids hangs when not rendering points.