summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Fix llvmpipe on big-endian machinesAdam Jackson2013-06-2432-346/+326
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 0857a7e105bfcbc4d1431b2cc56612094c747ca3 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:07 2013 -0400 gallivm: Fix lp_build_rgba8_to_fi32_soa for big endian Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 0d65131649a8aa140e2db228ba779d685c4333e3 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:07 2013 -0400 gallivm: Fix big-endian machines This adds a bit-shift count to the format table, and adds the concept of vector or bitwise alignment on gathers. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 9740bda9b7dc894b629ed38be9b51059ce90818f Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:07 2013 -0400 llvmpipe: Fix convert_to_blend_type on big-endian Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit ae037c2de0f029e4e99371c0de25560484f0d8df Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 util: Convert color pack to packed formats This fixes them on big-endian. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 5b05ac0c89ae092ea8ba5bba9f739708d7396b5c Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 graw-xlib: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 51396e7d098cb6ff794391cf11afe4dbf86dbea0 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 format: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 417b60bc66eb450e68a92ab0e47f76e292b385e6 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 18 12:25:06 2013 -0400 st/dri: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 0934b2e022a5e0847d312c40734e2b44cac52fd8 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 st/xlib: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit a307ea3c3716a706963acce7966b5e405ba11db9 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 gbm: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 53eebdd253e1960a645ea278f31d7ef6a6cf4aeb Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 tests: Convert to packed formats Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 2f77fe3ee524945eacd546efcac34f7799fb3124 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 18 13:07:37 2013 -0400 gallium: Document packed formats Signed-off-by: Adam Jackson <ajax@redhat.com> commit 1f1017159ce951f922210a430de9229f91f62714 Author: Richard Sandiford <r.sandiford@uk.ibm.com> Date: Tue Jun 18 12:25:06 2013 -0400 gallium: Introduce 32-bit packed format names These are for interacting with buffers natively described in terms of bit shifts, like X11 visuals: uint32_t xyzw8888 = (x << 0) | (y << 8) | (z << 16) | (w << 24); Define these in terms of (endian-dependent) aliases to the array-style format names. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Richard Sandiford <r.sandiford@uk.ibm.com> commit 6cc7ab1ee66ed668da78c1d951dfd7782b4e786a Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 3 12:10:32 2013 -0400 gallium: Document format name conventions v2: - Fix a channel name thinko (Michel Dänzer) - Elaborate on SCALED versus INT - Add links to DirectX and FOURCC docs Signed-off-by: Adam Jackson <ajax@redhat.com> commit df4d269e7fb62051a3c029b84147465001e5776e Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 18 12:25:06 2013 -0400 gallivm: Remove all notion of byte-swapping Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
* llvmpipe: fix wrong results for queries not in a sceneRoland Scheidegger2013-06-221-12/+9
| | | | | | | | | The result isn't always 0 in this case (depends on query type), so instead of special casing this just use the ordinary path (should result in correct values thanks to initialization in query_begin/end), just skipping the fence wait. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium/docs: more documentation for pipe_resource::array_sizeBrian Paul2013-06-221-0/+6
| | | | | | | It should never be zero and for cube/cube_arrays it should be a multiple of six. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* svga: minor cleanups, comments in svga_tgsi_insn.cBrian Paul2013-06-221-8/+19
|
* svga: add null ptr check in svga_get_tex_sampler_view()Brian Paul2013-06-221-0/+3
| | | | Trivial.
* tools/trace: Several tweaks/fixes to dump_stateJosé Fonseca2013-06-221-9/+29
|
* trace: Dump result of create_stream_output_targetJosé Fonseca2013-06-221-0/+2
|
* vl/mpeg12: fix mpeg-1 bytestream parsingMaarten Lankhorst2013-06-221-6/+24
| | | | | | | | | | | This fixes the bytestream parsing of mpeg-1 stream, but still leaves open a number of issues with the interpretation: - IDCT mismatch control is not correct for MPEG-1. - Slices do not have to start and end on the same horizontal row of macroblocks. - picture_coding_type = 4 (D-pictures) is not handled. - full_pel_*_vector is not handled. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
* freedreno/a3xx/compiler: ensure min # of cycles after bary instrRob Clark2013-06-211-2/+13
| | | | | | | | | | The results of a bary.f do not appear to be immediatley available, but there is no explicit sync bit. Instead the compiler must just ensure that there are a minimum number of instructions following the bary before use of the result of the bary. We aren't clever enough for that so just throw in some nop's. Signed-off-by: Rob Clark <robclark@freedesktop.org>
* freedreno/a3xx/compiler: add TGSI_OPCODE_ABSRob Clark2013-06-211-6/+14
| | | | Signed-off-by: Rob Clark <robclark@freedesktop.org>
* freedreno/a3xx/compiler: add TGSI_OPCODE_DPHRob Clark2013-06-211-3/+18
| | | | Signed-off-by: Rob Clark <robclark@freedesktop.org>
* freedreno/a3xx/compiler: fix for replicating instructionsRob Clark2013-06-211-24/+18
| | | | | | | | | | | | | | If we are accumulating result into tmp.x, and need a mov to final destination, we want to move the .x component into all of the components enabled from the read dest's writemask, ie. we want: MOV dst.xyzw tmp.xxxx rather than: MOV dst.xyzw tmp.xyzw Signed-off-by: Rob Clark <robclark@freedesktop.org>
* mesa: Move the common _mesa_glsl_compile_shader() code to glsl/.Eric Anholt2013-06-216-125/+100
| | | | | | | | | | | This code had no relation to ir_to_mesa.cpp, since it was also used by intel and state_tracker, and most of it was duplicated with the standalone compiler (which has periodically drifted from the Mesa copy). v2: Split from the ir_to_mesa to shaderapi.c changes. Acked-by: Paul Berry <stereotype441@gmail.com> (v1) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Move shader compiler API code to shaderapi.cEric Anholt2013-06-212-35/+38
| | | | | | | | | | | There was nothing ir_to_mesa-specific about this code, but it's not exactly part of the compiler's core turning-source-into-IR job either. v2: Split from the ir_to_mesa to glsl/ commit, avoid renaming the sh variable. Acked-by: Paul Berry <stereotype441@gmail.com> (v1) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Fix missing setting of shader->IsES.Eric Anholt2013-06-211-0/+1
| | | | | | | | | | | | | I noticed this while trying to merge code with the builtin compiler, which does set it. Note that this causes two regressions in piglit in default-precision-sampler.* which try to link without a vertex or fragment shader, due to being run under the desktop glslparsertest binary (using ARB_ES3_compatibility) that doesn't know about this requirement. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
* mesa: Use shared code for converting shader targets to short strings.Eric Anholt2013-06-219-43/+61
| | | | | | | | We were duplicating this code all over the place, and they all would need updating for the next set of shader targets. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
* glsl: Remove ir_print_visitor.h includes and usageEric Anholt2013-06-2118-26/+8
| | | | | | | | | | | | | We have ir->print() to do the old declaration of a visitor and having the IR accept the visitor (yuck!). And now you can call _mesa_print_ir() safely anywhere that you know what an ir_instruction is. A couple of missing printf("\n")s are added in error paths -- when an expression is handed to the visitor, it doesn't print '\n' (since it might be a step in printing a whole expression tree). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
* 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 <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
* glsl: Make some files safe to include from CPaul Berry2013-06-213-0/+8
| | | | | Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* tools/trace: Quick instructions/notes.José Fonseca2013-06-212-0/+48
| | | | Reviewed-by: Brian Paul <brianp@vmware.com>
* tools/trace: Do a better job at comparing multi line strings.José Fonseca2013-06-211-1/+34
| | | | | For TGSI diffing. Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* tools/trace: Defer blob hex-decoding.José Fonseca2013-06-212-9/+27
| | | | | To speed up parsing. Reviewed-by: Brian Paul <brianp@vmware.com>
* trace: Don't dump texture transfers.José Fonseca2013-06-213-10/+19
| | | | | Huge trace files with little value. Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <jfonseca@vmware.com>
* 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 <jfonseca@vmware.com>
* 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 <jfonseca@vmware.com>
* 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 <jfonseca@vmware.com>
* 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 <jfonseca@vmware.com>
* 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 <jfonseca@vmware.com>
* svga: reindent svga_tgsi.cBrian Paul2013-06-191-63/+65
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* svga: whitespace, comment, formatting fixes in svga_tgsi_emit.hBrian Paul2013-06-191-42/+56
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* 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 <jfonseca@vmware.com>
* svga: formatting fixes in svga_tgsi_insn.cBrian Paul2013-06-191-260/+395
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: wrap comments, code to 78 columns in multisample.cBrian Paul2013-06-191-6/+11
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa: remove unused BITSET64 macrosBrian Paul2013-06-191-61/+0
| | | | Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* 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 <emil.l.velikov@gmail.com>
* 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 <krh@bitplanet.net>
* 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 <jordan.l.justen@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Paul Berry <stereotype441@gmail.com>
* 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 <mattst88@gmail.com>
* 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 <zackr@vmware.com>
* 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 <jfonseca@vmware.com>
* 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 <jfonseca@vmware.com>