summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Make _mesa_print_ir() available from anything including ir.h.Eric Anholt2013-06-213-3/+11
| | | | | | | | | | No more forgetting to #include "ir_print_visitor.h" when doing temporary debug code, or forgetting and leaving it in after removing your temporary debug code. Also, available from C code so you don't need to move the caller to C++ just to call it (see also: ir_to_mesa.cpp). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Make some files safe to include from CPaul Berry2013-06-213-0/+8
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* tools/trace: Quick instructions/notes.José Fonseca2013-06-212-0/+48
| | | | Reviewed-by: Brian Paul <[email protected]>
* tools/trace: Do a better job at comparing multi line strings.José Fonseca2013-06-211-1/+34
| | | | | For TGSI diffing. Reviewed-by: Brian Paul <[email protected]>
* tools/trace: Tool to compare json state dumps.José Fonseca2013-06-211-0/+324
| | | | | Copied verbatim from apitrace's scripts/jsondiff.py Reviewed-by: Brian Paul <[email protected]>
* tools/trace: Tool to dump gallium state at any draw call.José Fonseca2013-06-212-2/+635
| | | | | | | Based from the code from the good old python state tracker. Extremely handy to diagnose regressions in state trackers. Reviewed-by: Brian Paul <[email protected]>
* tools/trace: Defer blob hex-decoding.José Fonseca2013-06-212-9/+27
| | | | | To speed up parsing. Reviewed-by: Brian Paul <[email protected]>
* trace: Don't dump texture transfers.José Fonseca2013-06-213-10/+19
| | | | | Huge trace files with little value. Reviewed-by: Brian Paul <[email protected]>
* ilo: replace a boolean by boolChia-I Wu2013-06-201-1/+1
| | | | bool is used internally. This is just cosmetic.
* ilo: rename cache_seqno to uploadedChia-I Wu2013-06-202-6/+6
| | | | It has been used as a bool since shader cache rework.
* util: (trivial) add has_popcnt fieldRoland Scheidegger2013-06-192-0/+2
| | | | | | Not used yet but there's a couple of places in llvmpipe which should use this (occlusion count is currently very inefficent if there's no cpu popcnt instruction).
* llvmpipe: use 64bit counter for occlusion queriesRoland Scheidegger2013-06-193-5/+10
| | | | | | | Some APIs require 64bit and at least for 64bit archs the overhead should be minimal. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: handle more queriesRoland Scheidegger2013-06-197-14/+67
| | | | | | | | | | | Handle PIPE_QUERY_GPU_FINISHED and PIPE_QUERY_TIMESTAMP_DISJOINT, and also fill out the ps_invocations and c_primitives from the PIPE_QUERY_PIPELINE_STATISTICS (the others in there should already be handled). Note that ps_invocations isn't pixel exact, just 16 pixel exact but I guess it's better than nothing. Doesn't really seem to work correctly but there's probably bugs elsewhere. Reviewed-by: Jose Fonseca <[email protected]>
* softpipe: handle all queries, and change for the new disjoint semanticsRoland Scheidegger2013-06-191-11/+28
| | | | | | | | The driver can do render_condition but wasn't handling the occlusion and so_overflow predicates (though the latter might not work yet due to gs support). Reviewed-by: Jose Fonseca <[email protected]>
* gallium: fix PIPE_QUERY_TIMESTAMP_DISJOINTRoland Scheidegger2013-06-193-12/+12
| | | | | | | | | | | The semantics didn't really make sense, not really matching neither d3d9 (though the docs are all broken there) nor d3d10. So make it match d3d10 semantics, which actually gives meaning to the "disjoint" part. Drivers are fixed up in a very primitive way, I have no idea what could actually cause the counter to become unreliable so just always return FALSE for the disjoint part. Reviewed-by: Jose Fonseca <[email protected]>
* trace: Dump pipe_rasterizer_state::clip_halfz.José Fonseca2013-06-191-0/+1
| | | | Trivial.
* svga: add some comments about primitive conversionBrian Paul2013-06-192-11/+26
| | | | | | | And clean up the svga_translate_prim() function with better variable names. Reviewed-by: Jose Fonseca <[email protected]>
* indices: add some commentsBrian Paul2013-06-192-4/+28
| | | | | | This is pretty complicated code with few/any comments. Here's a first stab. Reviewed-by: Jose Fonseca <[email protected]>
* svga: reindent svga_tgsi.cBrian Paul2013-06-191-63/+65
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: whitespace, comment, formatting fixes in svga_tgsi_emit.hBrian Paul2013-06-191-42/+56
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: move some svga/tgsi functionsBrian Paul2013-06-193-125/+149
| | | | | | | | Move some functions from the svga_tgsi_insn.h header into the svga_tgsi_insn.c file since they're only used there. Plus, add comments and fix formatting. Reviewed-by: Jose Fonseca <[email protected]>
* svga: formatting fixes in svga_tgsi_insn.cBrian Paul2013-06-191-260/+395
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: wrap comments, code to 78 columns in multisample.cBrian Paul2013-06-191-6/+11
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* mesa: remove unused BITSET64 macrosBrian Paul2013-06-191-61/+0
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* nvc0: kill assert in ppp codeMaarten Lankhorst2013-06-191-2/+0
| | | | | It's no longer always true, and the video tilign aligment should ensure the alignment is handled correctly regardless.
* ilo: rework shader cacheChia-I Wu2013-06-199-186/+356
| | | | | | | | | The new code makes the shader cache manages all shaders and be able to upload all of them to a caller-provided bo as a whole. Previously, we uploaded only the bound shaders. When a different set of shaders is bound, we had to allocate a new kernel bo to upload if the current one is busy.
* nv50: avoid crash on updating RASTERIZE_ENABLE stateEmil Velikov2013-06-191-0/+10
| | | | | | | | When doing blit using the 3D engine, the rasterizer cso may be NULL. Ported from nvc0 commit 8aa8b0539. Signed-off-by: Emil Velikov <[email protected]>
* wayland: Handle global_remove event as wellKristian Høgsberg2013-06-181-1/+8
| | | | | | | | | | | | We need to set up a handler for the global_remove event that gets sent out when a global gets removed. Without the handler we end up calling a NULL pointer. https://bugs.freedesktop.org/show_bug.cgi?id=65910 NOTE: This is a candidate for the stable branches. Signed-off-by: Kristian Høgsberg <[email protected]>
* gen7: fix GPU hang on WebGL texture-size testJordan Justen2013-06-181-1/+1
| | | | | | | | | | | | | | | | | | When rendering to a texture with BaseLevel set, the miptree may be laid out such that BaseLevel is in level 0 of the miptree (to avoid wasting memory on unused levels between 0 and BaseLevel-1). In that case, we have to shift our render target's level down to the appropriate level of the smaller miptree. The WebGL test in combination with a meta code relating to glGenerateMipmap also triggered a similar failure scenario. This GPU hang regression was introduced by c754f7a8. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=65324 Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* intel: Remove unused IS_POWER_OF_TWO() macro.Eric Anholt2013-06-181-2/+0
| | | | | | The is_power_of_two() inline function has been used instead. Reviewed-by: Matt Turner <[email protected]>
* Revert "draw: clear the draw buffers in draw"Zack Rusin2013-06-178-34/+13
| | | | | | | | | | | This reverts commit 41966fdb3b71c0b70aeb095e0eb3c5626c144a3a. While it's a lot cleaner it causes regressions because the draw interface is always called from the draw functions of the drivers (because the buffers need to be mapped) which means that the stream output buffers endup being cleared on every draw rather than on setting. Signed-off-by: Zack Rusin <[email protected]>
* llvmpipe: fixes for conditional renderingRoland Scheidegger2013-06-184-36/+86
| | | | | | | | | | honor render_condition for clear_render_target and clear_depth_stencil. Also add minimal support for occlusion predicate, though it can't be active at the same time as an occlusion query yet. While here also switchify some large if-else (actually just mutually exclusive if-if-if...) constructs. Reviewed-by: Jose Fonseca <[email protected]>
* gallium: add condition parameter to render_conditionRoland Scheidegger2013-06-1842-40/+95
| | | | | | | | | | | | | For conditional rendering this makes it possible to skip rendering if either the predicate is true or false, as supported by d3d10 (in fact previously it was sort of implied skip rendering if predicate is false for occlusion predicate, and true for so_overflow predicate). There's no cap bit for this as presumably all drivers could do it trivially (but this patch does not implement it for the drivers using true hw predicates, nvxx, r600, radeonsi, no change is expected for OpenGL functionality). Reviewed-by: Jose Fonseca <[email protected]>
* ilo: construct depth/stencil command in create_surface()Chia-I Wu2013-06-186-271/+368
| | | | | | | | | | Add ilo_gpe_init_zs_surface() to construct 3DSTATE_DEPTH_BUFFER 3DSTATE_STENCIL_BUFFER 3DSTATE_HIER_DEPTH_BUFFER at surface creation time. This allows fast state emission in draw_vbo().
* intel: Allow blorp CopyTexSubImage to nonzero destination slices.Eric Anholt2013-06-173-14/+9
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* intel: Allow blit CopyTexSubImage to nonzero destination slices.Eric Anholt2013-06-171-14/+9
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* intel: Directly implement blit glBlitFramebuffer instead of awkward reuse.Eric Anholt2013-06-173-70/+72
| | | | | | | | | | This gets us support for blitting to attachment types other than textures. v2: fix up comments from review by Kenneth. Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
* intel: Move XRGB->ARGB blit logic into intel_miptree_blit().Eric Anholt2013-06-174-100/+63
| | | | | | | | Now any caller (such as glCopyPixels()) can benefit from it, and it only changes the correct subset of the destination instead of a whole teximage. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* intel: Fix Y tiling support for glCopyTexSubImage's alpha override.Eric Anholt2013-06-171-4/+4
| | | | | | | | | | | Apparently we don't have any piglit tests for this, because it would have assertion failed in a debug build, or just rendered wrong in a non-debug build if the destination wasn't covering whole tiles. v2: Use the new macros. Reviewed-by: Paul Berry <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]> (v1)
* intel: Make batch macros for doing BCS_SWCTRL setup.Eric Anholt2013-06-171-37/+47
| | | | | | | | | | | | | We're going to add more BCS_SWCTRL setup instances soon, and you have to be careful to have the set and restore atomic with the rendering that's done, so that our state doesn't leak out to other rendering processes. v2: Rewrite the patch to have batch begin/advance macros so that magic numbers don't get sprinkled around (and so you don't mix up your do-I-need-to-reset vs what-do-I-reset-to logic, which I nearly did in the next patch when first writing it) Acked-by: Kenneth Graunke <[email protected]>
* mesa: Hide weirdness of 1D_ARRAY textures from Driver.CopyTexSubImage().Eric Anholt2013-06-177-52/+67
| | | | | | | | | | | | | | | | | Intel had brokenness here, and I'd like to continue moving Mesa toward hiding 1D_ARRAY's ridiculousness inside of the core, like we did with MapTextureImage. Fixes copyteximage 1D_ARRAY on intel. There's still an impedance mismatch in meta when falling back to read and texsubimage, since texsubimage expects coordinates into 1D_ARRAY as (width, slice, 0) instead of (width, 0, slice). v2: Fix offset of scanline reads from the source. (Thanks Brian!), replace dd.h comment with Paul's text and replace early exit with an assert. Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Paul Berry <[email protected]> (v1)
* tgsi: text parser: fix parsing of array in declarationDave Airlie2013-06-181-3/+9
| | | | | | | | | | | I noticed this code didn't work as advertised while doing some passing around of TGSI shaders and trying to reparse them, and things failing. This seems to fix it here for at least the small test case I hacked into a graw test. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: Fix ieee fp on AlphaSven Joachim2013-06-171-1/+1
| | | | | | | | | | | Commit 1f82bf12ed inadvertently broke it, checking for __IEEE_FLOAT on all Alpha machines instead of only on VMS as before. NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Andreas Boll <[email protected]> Signed-off-by: Sven Joachim <[email protected]>
* st/xlib: Fix XImage stride calculationRichard Sandiford2013-06-171-4/+4
| | | | | | | | | Fixes window skew seen while running gnome on a 16-bit screen over vnc. NOTE: This is a candidate for stable release branches. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Richard Sandiford <[email protected]>
* st/xlib Fix XIMage bytes-per-pixel calculationRichard Sandiford2013-06-171-3/+2
| | | | | | | | | Fixes a crash seen while running gnome on a 16-bit screen over vnc. NOTE: This is a candidate for stable release branches. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Richard Sandiford <[email protected]>
* gallium: replace bswap_32 calls with util_bswap32Jonathan Gray2013-06-174-9/+7
| | | | | | | | | byteswap.h and bswap_32 aren't portable, replace them with calls to gallium's util_bswap32 as suggested by Mark Kettenis. Lets these files build on OpenBSD. Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* draw: fix a regression in computing max eltZack Rusin2013-06-171-0/+1
| | | | | | | | | | | | | gl can use elts without setting indices, in which case our eltMax was set to 0 and always invoking the overflow condition. So by default set eltMax to maximum, it will be curbed by draw_set_indexes (if it ever comes) and if not then it will let gl's glVertexPointer/glDrawArrays work correctly. Fixes piglit's triangle-rasterization-overdraw test. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* draw: clear the draw buffers in drawZack Rusin2013-06-178-13/+34
| | | | | | | | | | Moves clearing of the draw so target buffers to the draw module. They had to be cleared in the drivers before which was quite messy. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* ilo: add pipe-based copy method to ilo_blitterChia-I Wu2013-06-172-5/+25
| | | | It enables accelerated resource_copy_region() when blt-based method fails.
* ilo: add BLT-based blitting methods to ilo_blitterChia-I Wu2013-06-174-495/+847
| | | | | | Port BLT code in ilo_blit.c to BLT-based blitting methods of ilo_blitter. Add BLT-based clears. The latter is verifed with util_clear(), but it is not in use yet.