summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* intel: bump DRI_IMAGE extension version to 3Jesse Barnes2012-02-221-1/+1
| | | | | | | To indicate support for the format query. Reviewed-by: Kristian Høgsberg <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
* gbm: track buffer format through DRI driversJesse Barnes2012-02-2210-5/+179
| | | | | | | | | | | | GBM needs the buffer format in order to communicate with DRM and clients for things like scanout. So track the DRI format requested in the various back ends and use it to return the DRI format back to GBM when requested. GBM will then map this into the GBM surface type (which is in turn based on the DRM fb format list). Signed-off-by: Jesse Barnes <[email protected]>
* tests/graw: Add a bunch of tests.José Fonseca2012-02-2210-372/+1794
| | | | | | | | These were rotting in an internal branch, but contain nothing confidential, and would be much more useful if kept up-to-date with latest gallium interface changes. Several authors including Keith Whitwell, Zack Rusin, and Brian Paul.
* mesa: add special case in texstore.c for GL_LUMINANCE_ALPHA src imageBrian Paul2012-02-221-0/+26
| | | | | | About a 10% improvement over the swizzle-copy path. Reviewed-by: Jose Fonseca <[email protected]>
* gallium/cso: Put the comment about shader in the code for future reference.José Fonseca2012-02-221-0/+7
|
* i965/gen6: Fix near-NULL deref in setting up GS binding table for non-XFB.Eric Anholt2012-02-211-5/+8
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Kenneth Graunke <[email protected]>
* i965: Correct the size of the state batch space allocated for binding tables.Eric Anholt2012-02-212-2/+2
| | | | | | | | | In the gen6 GS case, we were under-counting and so other state would get smashed. In the VS case, we were over-counting, so everything was fine. Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Kenneth Graunke <[email protected]>
* i965: Fix a bad comment in gen6 sol setup.Eric Anholt2012-02-211-3/+1
| | | | | | | | | This was copy and paste from the VS where I had similar code. We're only looking at things derived from BRW_NEW_VERTEX_PROGRAM in this block. Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Kenneth Graunke <[email protected]>
* i965/gen6: Fix the size of the GS surface binding table.Eric Anholt2012-02-211-1/+1
| | | | | | | I obviously didn't test on gen6 before pushing. Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: Kenneth Graunke <[email protected]>
* r600g: move invariant register updates into start_cs for evergreen and caymanMarek Olšák2012-02-213-118/+100
|
* r600g: move invariant register updates into start_cs for r6xx-r7xxMarek Olšák2012-02-213-102/+82
|
* r600g: add a depth misc state which depends on occlusion queriesMarek Olšák2012-02-2110-91/+152
| | | | | | | | | | | | | | | | This is a state which is derived from other states and is actually the first state which doesn't correspond to any gallium state. There are two state flags: bool occlusion_query_enabled bool flush_depthstencil_enabled Additional flags can be added later if needed, e.g. bool hiz_enabled. The emit function will have to figure out the register values by itself. It basically just emits the registers when the state changes. This commit also adds a few helper functions for writing registers directly into a command stream.
* r600g: consolidate the main draw codeMarek Olšák2012-02-214-133/+50
| | | | | The code was almost the same for r600 and eg. What can't be consolidated is in the *_prepare functions.
* r600g: move all invariant state from draw_vbo into start_csMarek Olšák2012-02-217-20/+35
|
* r600g: turn init_config into a command buffer for starting a CSMarek Olšák2012-02-2110-479/+379
| | | | | | | | | | | This is the first pure command buffer. It contains CS initialization packets and emits invariant state (i.e. the registers which never or rarely change). The affected registers are removed from *_hw_context.c, so that both ways of emitting commands can co-exist. v2: emit context_control in cayman's start_cs too
* i965: Only set Last Render Target Select on the last FB write.Kenneth Graunke2012-02-211-1/+1
| | | | | | | | | | | | | Fixes GPU hangs in OilRush, Trine, and Amnesia: The Dark Descent, which all use MRT (multiple render targets). NOTE: This is a candidate for release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38720 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40059 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45216 Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* gallium/cso: kill off non-functional shader cachingMarek Olšák2012-02-214-171/+0
| | | | | | | | | Suggested by José. We don't provide shader caching in CSO. Most of the time the api provides object semantics for shaders anyway, and the cases where it doesn't (eg mesa's internall-generated texenv programs), it will be up to the state tracker to implement their own specialized caching.
* gallium/util: remove u_simple_screenMarek Olšák2012-02-213-182/+0
| | | | Deprecated and unused.
* gallium: remove unused winsys pointers in pipe_screen and pipe_contextMarek Olšák2012-02-2121-37/+0
| | | | A winsys is already a private object of a driver.
* intel: Silence valgrind warning for getparam ioctl argument.Eric Anholt2012-02-211-0/+1
| | | | It was concerned that the 4 pad bytes on LP64 were uninitialized.
* i965: Rename the original binding table to mention that it's the WM now.Eric Anholt2012-02-217-32/+30
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Split the gen6 GS binding table to a separate table.Eric Anholt2012-02-215-10/+75
| | | | | | | | Improves VS state change microbenchmark performance by 7.08729% +/- 1.22289% (n=10) on gen7, because we don't upload the 64 dwords of unused binding table any more. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Split the VS binding table to a separate table.Eric Anholt2012-02-219-17/+94
| | | | | | | | This is a step toward making the samplers/binding tables reflect sampler uniform mappings instead of embedding those in the programs. No significant performance difference on the microbenchmark (n=10). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen6+: Avoid recomputing whether we use noperspective.Eric Anholt2012-02-213-36/+10
| | | | | | | Improves VS state change microbenchmark performance 2.38246% +/- 1.15046% (n=20). Reviewed-by: Kenneth Graunke <[email protected]>
* i965/gen7: Skip checking if we need a GS program for now.Eric Anholt2012-02-211-1/+0
| | | | | | | We always say no. Improves VS state change microbenchmark performance 7.68747% +/- 1.40826% (n=10). Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Compute required barycentric interp modes once at FS compile time.Eric Anholt2012-02-214-20/+17
| | | | | | | Improves VS state change microbenchmark performance 1.78817% +/- 0.556878% (n=25). Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Move VUE map computation to once at VS compile time.Eric Anholt2012-02-2112-49/+42
| | | | | | | | | | With this and the previous patch, 640x480 nexuiz is running 0.169118% +/- 0.0863696% faster (n=121). On a VS state change microbenchmark, performance is increased 8.28645% +/- 0.460478% (n=52). v2: Fix CACHE_NEW_VS comment. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Make the userclip flag for the VUE map come from VS prog data.Eric Anholt2012-02-2110-39/+29
| | | | | | | | This reduces recomputation of state based on non-clipping-related transform changes, and is a step toward removing VUE map recomputation. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: fix issues with texture border and array texturesAnuj Phogat2012-02-211-11/+59
| | | | | | | | | | | For a 1D texture array, the border only applies to the width. For a 2D texture array the border applies to the width and height but not the depth. Sucha cases were not handled correctly in _mesa_init_teximage_fields(). Note: This is a candidate for stable branches Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeon/r600g: fix virtual address space allocationJerome Glisse2012-02-211-0/+3
| | | | Signed-off-by: Jerome Glisse <[email protected]>
* llvmpipe: Remove lp_test_sincos.José Fonseca2012-02-216-909/+8
| | | | Completely replaced by lp_test_arit.
* vl: add support for bob deinterlacingChristian König2012-02-214-12/+66
| | | | | | | v2: return VDP_STATUS_INVALID_VIDEO_MIXER_PICTURE_STRUCTURE for unknown picture structure. Signed-off-by: Christian König <[email protected]>
* st/vdpau: Use transfer_inline_write to upload ycbcr dataChristian König2012-02-211-18/+5
| | | | | | Uses less code and looks at least a bit cleaner than mapping manually. Signed-off-by: Christian König <[email protected]>
* st/vdpau: remove unnecessary tracing and adjust tracing levels a bitChristian König2012-02-217-64/+4
| | | | | | | | | Tracing function entry/exits is a bit pointless when VDPAU_TRACE=1 does the same thing. v2: use WARN instead of ERR for application problems Signed-off-by: Christian König <[email protected]>
* gallivm: Fix TGSI_OPCODE_ARR's translation.José Fonseca2012-02-213-2/+22
| | | | | | | | | | | | | Like TGSI_OPCODE_ARL, destination should be an integer. This fixes invalid LLVM IR on an internal state tracker (currently Mesa never emits this opcode). In the future consider making ADDR register also a integer-as-float array, like all other register kinds, or simply replace ADDR & ARR/ARL with integer temp and instructions. Reviewed-by: Dave Airlie <[email protected]>
* st/egl: Move drm_display_authenticate into HAVE_WAYLAND_BACKEND section.Vinson Lee2012-02-201-9/+9
| | | | | | | | | Fixes this GCC warning. native_drm.c:153:1: warning: ‘drm_display_authenticate’ defined but not used [-Wunused-function] Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: Don't assume vector is 4 wide in lp_build_sin()/lp_build_cos()José Fonseca2012-02-201-81/+60
| | | | Reviewed-by: Dave Airlie <[email protected]>
* mesa: check for no state change in glPrimitiveRestartIndex()Brian Paul2012-02-201-4/+5
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: check for no state change in Enable/DisableVertexAttribArray()Brian Paul2012-02-201-10/+22
| | | | | | | Avoid setting dirty state flags when enabling or disabling a vertex attribute arrays when there's no change. Reviewed-by: José Fonseca <[email protected]>
* mesa: add missing return after _mesa_error() in update_array()Brian Paul2012-02-201-0/+1
| | | | | | NOTE: This is a candidate for the 8.0 branch. Reviewed-by: José Fonseca <[email protected]>
* r300g: Fix build when libdrm is installed to non-standard dirTom Stellard2012-02-191-0/+2
|
* i965: Make the dummy fragment shader work in SIMD16 mode.Kenneth Graunke2012-02-181-5/+7
| | | | | | | | | | If you're resorting to the dummy shader, you've probably already turned off SIMD16 mode. But if you didn't, it would die in a fire. We could either fail to compile in SIMD16 mode...or just fix it. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Fix GPU hangs in the dummy fragment shader.Kenneth Graunke2012-02-181-0/+2
| | | | | | | | The dummy FB write failed to specify EOT and a message length, causing the GPU to hang. Now we can enjoy "everyone's favorite color" again. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/vega: Remove unused variable.Vinson Lee2012-02-181-4/+0
| | | | | | | | | | Fixes this GCC warning. mask.c: In function ‘mask_layer_fill’: mask.c:387:12: warning: variable ‘alpha_color’ set but not used [-Wunused-but-set-variable] Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* st/glx: Remove unused variables.Vinson Lee2012-02-181-6/+3
| | | | | | | | | | | | | | Fixes these GCC warnings. glx_api.c: In function ‘choose_visual’: glx_api.c:678:8: warning: variable ‘trans_value’ set but not used [-Wunused-but-set-variable] glx_api.c:677:8: warning: variable ‘trans_type’ set but not used [-Wunused-but-set-variable] glx_api.c:663:8: warning: variable ‘min_ci’ set but not used [-Wunused-but-set-variable] Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* draw: add missing streamout state setup for draw/llvm.Dave Airlie2012-02-181-0/+1
| | | | Signed-off-by: Dave Airlie <[email protected]>
* vbo: Eliminate short-circuiting in invalid-start case.Kenneth Graunke2012-02-171-5/+1
| | | | | | | | | | | Now that we have a index_range_invalid flag, we can just use that rather than calling vbo_validated_drawrangeelements directly and returning. NOTE: This is a candidate for release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* vbo: Rework checking of 'end' against _MaxElement.Kenneth Graunke2012-02-171-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | This failed to take basevertex into account: If basevertex < 0: (end + basevertex) might actually be in-bounds while 'end' is not. We would have clamped in this case when we probably shouldn't. This could break application drawing. If basevertex > 0: 'end' might be in-bounds while (end + basevertex) might not. We would have failed to clamp in this place. There's a comment indicating the TNL module depends on max_index being in-bounds; if so, it would likely break horribly. Rather than trying to clamp correctly in the face of basevertex, simply delete the clamping code and indicate that we don't have a valid range. This causes _tnl_vbo_draw_prims to use vbo_get_minmax_indices() to compute the actual bounds, which is much safer. NOTE: This is a candidate for release branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: Ignore invalid element ranges which are outside VBO bounds.Kenneth Graunke2012-02-171-0/+25
| | | | | | | | | | | | | | | | | | | | | | | Some applications, such as Regnum Online, appear to pass invalid start/end values to glDrawRangeElements. In particular, the 'start' index sometimes exceeds the maximum array element. This is clearly invalid behavior, and although the spec isn't clear, seems to result in undefined, implementation-specific behavior. This patch takes the conservative approach and simply ignores the range, while issuing a warning indicating that the application is broken and should be fixed. NOTE: This is a candidate for release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45214 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44701 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41152 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40361 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28138 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> [v1] Reviewed-by: Roland Scheidegger <[email protected]>
* vbo: Remove pedantic warning about 'end' beind out of bounds.Kenneth Graunke2012-02-171-47/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The application supplied [start, end] range is merely a conservative hint of the ranges of index values inside the index buffer. There is no requirement that all vertices in the range [start, end] be referenced. Passing an 'end' value larger than the maximum legal index is perfectly acceptible; applications can legally pass 0xffffffff when they don't have a tighter bound readily available. Thus, the warning doesn't indicate a correctness issue; it could only indicate a performance issue. However, it does not even do that. glDrawRangeElements is designed to optimize non-VBO vertex data uploads by providing an upper bound on the size of buffers a driver would need to allocate. With VBOs, the data is already in an uploaded buffer, so the range doesn't help. The clincher is: we only know _MaxElement for VBOs. For user-space arrays, we just set it to 2,000,000,000 (see mesa/main/varray.h:63.) So we can only check this in the case where it is not useful. Many applications, including the Unigine demos, currently trigger this warning, which suggests the applications are buggy when they're actually fine. Eliminating the warning should confuse users less while not actually losing any benefit to application developers. NOTE: This is a candidate for release branches. Suggested-by: Jose Fonseca <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>