summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* svga: use new svga_age_texture_view() helperBrian Paul2013-06-252-1/+14
| | | | | | | | | The function does array bounds checking. Note, this exposes a bug in the svga_mark_surface_dirty() function: we're calling svga_age_texture_view() with a texture slice instead of mipmap level. This can lead to a failed assertion. That'll be fixed next. Reviewed-by: Jose Fonseca <[email protected]>
* svga: add array index assertion in svga_validate_sampler_view()Brian Paul2013-06-251-0/+1
|
* svga: use svga_texture() helper instead of castingBrian Paul2013-06-251-1/+1
|
* util/debug: Cleanup/improve debug_symbol_name_dbghelp.José Fonseca2013-06-251-78/+161
| | | | | | | | | | | | - use mgwhelp -- the successor for bfdhelp which does not have a hard dependency on BFD, and works on 64bits. - use a macro instead of hand-typing to dispatch DbgHelp functions - dump line numbers - dump module names when symbols are not available - support 64bits. - add comments Reviewed-by: Brian Paul <[email protected]>
* util/debug: Make debug_backtrace_capture work for 64bit windows.José Fonseca2013-06-252-2/+61
| | | | | | Rely on Windows' CaptureStackBackTrace to do the grunt work. Reviewed-by: Brian Paul <[email protected]>
* draw: allow overflows in the llvm pathsZack Rusin2013-06-251-4/+8
| | | | | | | | | | | | Because our code couldn't handle it we were skipping rendering if we detected overflows. According to the spec we should still render but with all 0 vertices, which is what the llvm code already does. So for the llvm paths lets enable processing even if an overflow condition has been detected. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: avoid overflows in the llvm draw loopZack Rusin2013-06-251-8/+6
| | | | | | | | | | | Before we could easily overflow if start+count>max integer. To avoid it we can just iterate over the count. This makes sure that we never crash, since most of the overflow conditions is already handled. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* nvc0: do not set tiled mode on gart bo when fence debugging is usedMaarten Lankhorst2013-06-254-9/+15
| | | | Signed-off-by: Maarten Lankhorst <[email protected]>
* ilo: honor render condition in blitterChia-I Wu2013-06-254-8/+23
| | | | | | Make pass_render_condition() available for blitter, and check for render condition in (and only in) clear(), clear_render_target(), and clear_depth_stencil().
* ilo: remove ilo_shader_internal.h from GEN6 pipelineChia-I Wu2013-06-253-38/+55
| | | | Replace direct shader accesses with ilo_shader_get_kernel_param() and etc.
* ilo: remove ilo_shader_internal.h from GEN7 pipelineChia-I Wu2013-06-251-11/+6
| | | | Replace direct shader accesses with ilo_shader_get_kernel_param() and etc.
* ilo: speed up ilo_shader_select_kernel_routing() a bitChia-I Wu2013-06-252-4/+32
| | | | | Remember the order of the source attributes and avoid recomputation when it does not change.
* ilo: move SBE setup code to ilo_shader.cChia-I Wu2013-06-256-155/+237
| | | | | | | | | Add ilo_shader_select_kernel_routing() to construct 3DSTATE_SBE. It is called in ilo_finalize_states(), rather than in create_fs_state(), as it depends on VS/GS and rasterizer states. With this change, ilo_shader_internal.h is no longer needed for ilo_gpe_gen6.c.
* ilo: use ilo_shader_state exclusively in GPEChia-I Wu2013-06-256-107/+44
| | | | | | This allows us to remove ilo_shader_internal.h from ilo_gpe_gen7.c. The unfinished code in 3DSTATE_DS, 3DSTATE_HS, and INTERFACE_DESCRIPTOR_DATA are partly or entirely removed.
* ilo: map SO registers at shader compile timeChia-I Wu2013-06-256-37/+72
| | | | | | | The unmodified pipe_stream_output_info describes its outputs as if they are in TGSI_FILE_OUTPUT. Remap the register indices to where they appear in the VUE. TGSI_SEMANTIC_PSIZE needs a little care because it is at the W channel.
* ilo: use ilo_shader_cso for FSChia-I Wu2013-06-258-154/+255
| | | | | Add ilo_gpe_init_fs_cso() to construct 3DSTATE_PS and shader part of 3DSTATE_WM once and early for fragment shaders.
* ilo: use ilo_rasterizer_state exclusively in GPEChia-I Wu2013-06-255-15/+17
| | | | | Replace pipe_rasterizer_state by ilo_rasterizer_state for the remaining GPE functions for consistency.
* ilo: convert pipe_rasterizer_state to ilo_rasterizer_wmChia-I Wu2013-06-257-62/+141
| | | | | Add ilo_gpe_init_rasterizer_wm() to construct fixed-function part of 3DSTATE_WM once in create_rasterizer_state().
* ilo: use ilo_shader_cso for GSChia-I Wu2013-06-257-145/+225
| | | | | Add ilo_gpe_init_gs_cso() to construct 3DSTATE_GS once and early for geometry shaders.
* ilo: introduce ilo_shader_cso for VSChia-I Wu2013-06-257-42/+102
| | | | | | | When a new VS kernel is generated, a newly added function, ilo_gpe_init_vs_cso(), is called to construct 3DSTATE_VS command in ilo_shader_cso. When the command needs to be emitted later, we copy the command from the CSO instead of constructing it dynamically.
* ilo: add functions to query shadersChia-I Wu2013-06-252-0/+152
| | | | | | Add ilo_shader_get_type() to query the type (PIPE_SHADER_x) of the shader. Add ilo_shader_get_kernel_offset() and ilo_shader_get_kernel_param() to query the cache offset and various kernel parameters of the selected kernel.
* ilo: clean up finalize_shader_states()Chia-I Wu2013-06-254-62/+79
| | | | | | | | Add ilo_shader_select_kernel() to replace the dependency table, ilo_shader_variant_init(), and ilo_shader_state_use_variant(). With the changes, we no longer need to include ilo_shader_internal.h in ilo_state.c.
* ilo: use multiple entry points for shader creationChia-I Wu2013-06-256-32/+96
| | | | | | | | | | | | Replace ilo_shader_state_create() by ilo_shader_create_vs() ilo_shader_create_gs() ilo_shader_create_fs() ilo_shader_create_cs() Rename ilo_shader_state_destroy() to ilo_shader_destroy(). The old ilo_shader_destroy() is renamed to ilo_shader_destroy_kernel().
* ilo: move internal shader interface to a new headerChia-I Wu2013-06-2513-183/+226
| | | | | Move it to ilo_shader_internal.h. The goal is to make files not part of the compiler include only ilo_shader.h eventually.
* gallium/hud: do not use free() for the free_query_data hookBrian Paul2013-06-243-3/+23
| | | | | | | That confuses Gallium's memory debugging code where CALLOC/MALLOC must be matched with FREE, not free(). Reviewed-by: Marek Olšák <[email protected]>
* draw: check for out-of-memory conditions in the AA line module.Matthew McClure2013-06-241-7/+34
| | | | | | | | | | | | To prevent segfaults in the AA line module, the code will check for a valid pointer to the aaline_stage in the draw context. Fixes segfault from backtrace: * aaline_stage_from_pipe aaline_delete_fs_state Reviewed-by: Brian Paul <[email protected]>
* tests/graw: Fix typo in shader-leak.cJosé Fonseca2013-06-241-1/+1
|
* tools/trace: Fix syntax.José Fonseca2013-06-241-1/+1
| | | | | Cleaned/commented up the code, but forgot to actually test before commiting...
* st/dri/sw: Fix pitch calculation in drisw_update_tex_bufferRichard Sandiford2013-06-241-2/+3
| | | | | | | | | | | | | | | swrastGetImage rounds the pitch up to 4 bytes for compatibility reasons that are explained in drisw_glx.c:bytes_per_line, so drisw_update_tex_buffer must do the same. Fixes window skew seen while running firefox over vnc on a 16-bit screen. NOTE: This is a candidate for the stable branches. [ajax: fixed typo in comment] Reviewed-by: Stéphane Marchesin <[email protected]> Signed-off-by: Richard Sandiford <[email protected]>
* gallium: Fix llvmpipe on big-endian machinesAdam Jackson2013-06-2432-346/+326
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* 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 <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* 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 <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* 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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* 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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* 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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* 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]>