summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* gallium: Fix llvmpipe on big-endian machinesAdam Jackson2013-06-2431-317/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 0857a7e105bfcbc4d1431b2cc56612094c747ca3 Author: Richard Sandiford <[email protected]> Date: Tue Jun 18 12:25:07 2013 -0400 gallivm: Fix lp_build_rgba8_to_fi32_soa for big endian Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 0d65131649a8aa140e2db228ba779d685c4333e3 Author: Richard Sandiford <[email protected]> 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 <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 9740bda9b7dc894b629ed38be9b51059ce90818f Author: Richard Sandiford <[email protected]> Date: Tue Jun 18 12:25:07 2013 -0400 llvmpipe: Fix convert_to_blend_type on big-endian Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit ae037c2de0f029e4e99371c0de25560484f0d8df Author: Richard Sandiford <[email protected]> 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 <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 5b05ac0c89ae092ea8ba5bba9f739708d7396b5c Author: Richard Sandiford <[email protected]> Date: Tue Jun 18 12:25:06 2013 -0400 graw-xlib: Convert to packed formats Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 51396e7d098cb6ff794391cf11afe4dbf86dbea0 Author: Richard Sandiford <[email protected]> Date: Tue Jun 18 12:25:06 2013 -0400 format: Convert to packed formats Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 417b60bc66eb450e68a92ab0e47f76e292b385e6 Author: Adam Jackson <[email protected]> Date: Tue Jun 18 12:25:06 2013 -0400 st/dri: Convert to packed formats Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 0934b2e022a5e0847d312c40734e2b44cac52fd8 Author: Richard Sandiford <[email protected]> Date: Tue Jun 18 12:25:06 2013 -0400 st/xlib: Convert to packed formats Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit a307ea3c3716a706963acce7966b5e405ba11db9 Author: Richard Sandiford <[email protected]> Date: Tue Jun 18 12:25:06 2013 -0400 gbm: Convert to packed formats Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 53eebdd253e1960a645ea278f31d7ef6a6cf4aeb Author: Richard Sandiford <[email protected]> Date: Tue Jun 18 12:25:06 2013 -0400 tests: Convert to packed formats Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 2f77fe3ee524945eacd546efcac34f7799fb3124 Author: Adam Jackson <[email protected]> Date: Tue Jun 18 13:07:37 2013 -0400 gallium: Document packed formats Signed-off-by: Adam Jackson <[email protected]> commit 1f1017159ce951f922210a430de9229f91f62714 Author: Richard Sandiford <[email protected]> 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 <[email protected]> Signed-off-by: Richard Sandiford <[email protected]> commit 6cc7ab1ee66ed668da78c1d951dfd7782b4e786a Author: Adam Jackson <[email protected]> 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 <[email protected]> commit df4d269e7fb62051a3c029b84147465001e5776e Author: Adam Jackson <[email protected]> Date: Tue Jun 18 12:25:06 2013 -0400 gallivm: Remove all notion of byte-swapping Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* freedreno/a3xx/compiler: add TGSI_OPCODE_ABSRob Clark2013-06-211-6/+14
| | | | Signed-off-by: Rob Clark <[email protected]>
* freedreno/a3xx/compiler: add TGSI_OPCODE_DPHRob Clark2013-06-211-3/+18
| | | | Signed-off-by: Rob Clark <[email protected]>
* 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 <[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]>
* 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]>
* 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-1841-37/+92
| | | | | | | | | | | | | 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().
* 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]>
* 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.
* ilo: replace util_blitter by ilo_blitterChia-I Wu2013-06-177-103/+363
| | | | | ilo_blitter is just a wrapper for util_blitter for now. We will port BLT code to ilo_blitter shortly.
* ilo: fix for half-float vertex arraysChia-I Wu2013-06-151-1/+14
| | | | | Commit 6fe0453c339b6e894e0ee8d2200e7638a43ed21e broke half-float vertex arrays. This reverts a part of that commit, and explains why.
* ilo: add some assertions to help debuggingChia-I Wu2013-06-141-1/+23
| | | | | | Assert that we do not support user vertex/index/constant buffers. Issue a warning when a sampler view is created for a resource without PIPE_BIND_SAMPLER_VIEW.