summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* r600g: consolidate two files r600d.hMarek Olšák2011-08-162-2242/+55
|
* r600g: set read/write usage flags for each relocationMarek Olšák2011-08-168-529/+564
| | | | | | This takes advantage of the new GEM_WAIT ioctl when mapping buffers. Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: take advantage of the new ioctlMarek Olšák2011-08-161-12/+28
| | | | Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: hook up the new DRM_RADEON_GEM_WAIT ioctlMarek Olšák2011-08-164-24/+65
| | | | Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: remove broken bo-is-busy-for-write guessingMarek Olšák2011-08-163-31/+0
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: enable thread offloadingMarek Olšák2011-08-166-16/+17
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: undefine RADEON_CTX_MAX_PM4Marek Olšák2011-08-163-8/+6
| | | | | | winsys/radeon has its own definition. Reviewed-by: Alex Deucher <[email protected]>
* r600g: don't include radeon_drm.h and xf86drm.hMarek Olšák2011-08-166-17/+6
| | | | Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: remove the device file descriptor from the interfaceMarek Olšák2011-08-162-2/+0
| | | | | | r600g doesn't need it anymore. Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove an unused parameter from r600_bo_destroyMarek Olšák2011-08-1610-33/+25
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: merge radeon_bo with r600_boMarek Olšák2011-08-167-134/+33
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove radeon_bo::handleMarek Olšák2011-08-165-16/+3
| | | | | | This should be private to radeon_winsys. Reviewed-by: Alex Deucher <[email protected]>
* r600g: use buffer_map/unmap from radeon_winsysMarek Olšák2011-08-1610-146/+23
| | | | | | This also drops the unneeded bo_busy/wait functions. Reviewed-by: Alex Deucher <[email protected]>
* r600g: set the flush callback in radeon_winsysMarek Olšák2011-08-167-22/+38
| | | | | | I have also renamed the winsys function. Reviewed-by: Alex Deucher <[email protected]>
* r600g: get tiling flags using radeon_winsysMarek Olšák2011-08-163-44/+9
| | | | | | Also remove some unused fence-related leftovers. Reviewed-by: Alex Deucher <[email protected]>
* r600g: get winsys_handle using radeon_winsysMarek Olšák2011-08-163-33/+1
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: move more DRM queries into winsys/radeonMarek Olšák2011-08-165-48/+24
| | | | Reviewed-by: Alex Deucher <[email protected]>
* winsys/radeon: consolidate the add_reloc functionMarek Olšák2011-08-163-38/+13
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: emit CS using radeon_winsysMarek Olšák2011-08-167-49/+20
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove struct r600_relocMarek Olšák2011-08-162-14/+3
| | | | | | That is really private to winsys/radeon. Reviewed-by: Alex Deucher <[email protected]>
* r600g: don't use RADEON_GEM_DOMAIN_CPUMarek Olšák2011-08-162-23/+21
| | | | | | | Also staging resources shouldn't be allocated with the initial domain being VRAM. Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove reloc-related variables from radeon_boMarek Olšák2011-08-163-44/+22
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: let radeon_winsys maintain the list of relocationsMarek Olšák2011-08-167-42/+59
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove now-unused r600_context::fenced_boMarek Olšák2011-08-163-9/+1
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove the fences which were used for the cache buffer managerMarek Olšák2011-08-164-145/+10
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove now-unused r600_bo::sizeMarek Olšák2011-08-162-3/+0
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove the cache buffer manager from winsys/r600Marek Olšák2011-08-166-223/+3
| | | | | | As we've just started using the one from winsys/radeon. Reviewed-by: Alex Deucher <[email protected]>
* r600g: allocate/destroy buffers using radeon_winsysMarek Olšák2011-08-166-83/+35
| | | | | | | We use the cache buffer manager from radeon_winsys now, but we don't use anything else yet. Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove unused function declarationsMarek Olšák2011-08-161-6/+0
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove unused r600_bo::tiling_flagsMarek Olšák2011-08-162-5/+5
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: remove unused r600_bo::kernel_pitchMarek Olšák2011-08-163-7/+3
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: put radeon_winsys in screen::winsys, don't include drm_driver in the pipeMarek Olšák2011-08-1612-45/+54
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: cleanup includes in winsysMarek Olšák2011-08-1610-77/+23
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: move some queries into winsys/radeonMarek Olšák2011-08-166-100/+51
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: first step into winsys/radeonMarek Olšák2011-08-1622-74/+93
| | | | Reviewed-by: Alex Deucher <[email protected]>
* dri2: Add __DRI_BUFFER_COUNT tokenBenjamin Franzke2011-08-162-2/+3
| | | | | | | Remove definition from egl_dri2. Defining this is egl_dri2.h breaks as soon as a new dri2 buffer token is added like with commit 4501a5d6e8d00fd0d87625352ed5ba1a8861f72e.
* dri2: add code to dri2_Flush extension.Cooper Yuan2011-08-161-0/+4
| | | | | | | It's going to flush client's commands in eglWaitClient(). Before this, egl applications using pixmap or pbuffer flicker because of no flush. Reviewed-by: Alan Hourihane
* glsl: When assigning to a whole array, mark the array as accessed.Eric Anholt2011-08-151-10/+11
| | | | | | | | | | | | | The vs-varying-array-mat2-col-row-wr test writes a mat2[3] constant to a mat2[3] varying out array, and also statically accesses element 1 of it on the VS and FS sides. At link time it would get trimmed down to just 2 elements, and then codegen of the VS would end up generating assignments to the unallocated last entry of the array. On the new i965 VS backend, that happened to land on the vertex position. Some issues remain in this test on softpipe, i965/old-vs and i965/new-vs on visual inspection, but i965 is passing because only one green pixel is probed, not the whole split green/red quad.
* radeon: Explain to the user what went wrong when built without libdrm.Eric Anholt2011-08-151-0/+6
| | | | | Before this commit, even LIBGL_DEBUG=verbose would just fail with: libGL error: failed to create dri screen
* glsl: Add validations for ir_call.Paul Berry2011-08-151-0/+36
| | | | | | | | | | | | | | | This patch extends ir_validate.cpp to check the following characteristics of each ir_call: - The number of actual parameters must match the number of formal parameters in the signature. - The type of each actual parameter must match the type of the corresponding formal parameter in the signature. - Each "out" or "inout" actual parameter must be an lvalue. Reviewed-by: Chad Versace <[email protected]>
* glsl: Make is_lvalue() and variable_referenced() const.Paul Berry2011-08-152-11/+11
| | | | | | | | | | These functions don't modify the target instruction, so it makes sense to make them const. This allows these functions to be called from ir validation code (which uses const to ensure that it doesn't accidentally modify the IR being validated). Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Perform implicit type conversions on function call out parameters.Paul Berry2011-08-151-5/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an out parameter undergoes an implicit type conversion, we need to store it in a temporary, and then after the call completes, convert the resulting value. In other words, we convert code like the following: void f(out int x); float value; f(value); Into IR that's equivalent to this: void f(out int x); float value; int out_parameter_conversion; f(out_parameter_conversion); value = float(out_parameter_conversion); This transformation needs to happen during ast-to-IR convertion (as opposed to, say, a lowering pass), because it is invalid IR for formal and actual parameters to have types that don't match. Fixes piglit tests spec/glsl-1.20/compiler/qualifiers/out-conversion-int-to-float.vert and spec/glsl-1.20/execution/qualifiers/vs-out-conversion-*.shader_test, and bug 39651. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39651 Reviewed-by: Chad Versace <[email protected]>
* docs: Remove GLw from the documentation except for a new FAQ entry.Kenneth Graunke2011-08-155-16/+6
| | | | | | Also remove an outdated reference to GLEW being in tree. Reviewed-by: Brian Paul <[email protected]>
* glw: Remove GLw source.Kenneth Graunke2011-08-1516-1357/+4
| | | | | | | | | | libGLw is an old OpenGL widget library with optional Motif support. It almost never changes and very few people actually still care about it, so we've decided to ship it separately. The new home for libGLw is: git://git.freedesktop.org/mesa/glw/ Reviewed-by: Brian Paul <[email protected]>
* glsl: Modify strategy for accumulating conditions when lowering if-statementsIan Romanick2011-08-151-11/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously if-statements were lowered from inner-most to outer-most (i.e., bottom-up). All assignments within an if-statement would have the condition of the if-statement appended to its existing condition. As a result the assignments from a deeply nested if-statement would have a very long and complex condition. Several shaders in the OpenGL ES2 conformance test suite contain non-constant array indexing that has been lowered by the shader writer. These tests usually look something like: if (i == 0) { value = array[0]; } else if (i == 1) { value = array[1]; } else ... The IR for the last assignment ends up as: (assign (expression bool && (expression bool ! (var_ref if_to_cond_assign_condition) ) (expression bool && (expression bool ! (var_ref if_to_cond_assign_condition@20) ) (expression bool && (expression bool ! (var_ref if_to_cond_assign_condition@22) ) (expression bool && (expression bool ! (var_ref if_to_cond_assign_condition@24) ) (var_ref if_to_cond_assign_condition@26) ) ) ) ) (x) (var_ref value) (array_ref (var_ref array) (constant int (5))) The Mesa IR that is generated from this is just as awesome as you might expect. Three changes are made to the way if-statements are lowered. 1. Two condition variables, if_to_cond_assign_then and if_to_cond_assign_else, are created for each if-then-else structure. The former contains the "positive" condition, and the later contains the "negative" condtion. This change was implemented in the previous patch. 2. Each condition variable is added to a hash-table when it is created. 3. When lowering an if-statement, assignments to existing condtion variables get the current condition anded. This ensures that nested condition variables are only set to true when the condition variable for all outer if-statements is also true. Changes #1 and #3 combine to ensure the correctness of the resulting code. 4. When a condition assignment is encountered with a condition that is a dereference of a previously added condition variable, the condition is not modified. Change #4 prevents the continuous accumulation of conditions on assignments. If the original if-statements were: if (x) { if (a && b && c && d && e) { ... } else { ... } } else { if (g && h && i && j && k) { ... } else { ... } } The lowered code will be if_to_cond_assign_then@1 = x; if_to_cond_assign_then@2 = a && b && c && d && e && if_to_cond_assign_then@1; ... if_to_cond_assign_else@2 = !if_to_cond_assign_then && if_to_cond_assign_then@1; ... if_to_cond_assign_else@1 = !if_to_cond_assign_then@1; if_to_cond_assign_then@3 = g && h && i && j; && if_to_cond_assign_else@1; ... if_to_cond_assign_else@3 = !if_to_cond_assign_then && if_to_cond_assign_else@1; ... Depending on how instructions are emitted, there may be an extra instruction due to the duplication of the '&& if_to_cond_assign_{then,else}@1' on the nested else conditions. In addition, this may cause some unnecessary register pressure since in the simple case (where the nested conditions are not complex) the nested then-condition variables are live longer than strictly necessary. Before this change, one of the shaders in the OpenGL ES2 conformance test suite's acos_float_frag_xvary generated 348 Mesa IR instructions. After this change it only generates 124. Many, but not all, of these instructions would have also been eliminated by CSE. Reviewed-by: Eric Anholt <[email protected]>
* glsl: Slight change to the code generated by if-flatteningIan Romanick2011-08-151-21/+39
| | | | | | | | | | | | | | | | | | | | | | Now the condition (for the then-clause) and the inverse condition (for the else-clause) get written to separate temporary variables. In the presence of complex conditions, this shouldn't result in more code being generated. If the original if-statement was if (a && b && c && d && e) { ... } else { ... } The lowered code will be if_to_cond_assign_then = a && b && c && d && e; ... if_to_cond_assign_else = !if_to_cond_assign_then; ... Reviewed-by: Eric Anholt <[email protected]>
* glsl: Replace foreach_iter with foreach_list_safeIan Romanick2011-08-151-2/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* glsl: Make move_block_to_cond_assign not care which branch it's processingIan Romanick2011-08-151-27/+17
| | | | | | This will make some future changes a bit easier to digest. Reviewed-by: Eric Anholt <[email protected]>
* egl: Log (debug) native platform typeBenjamin Franzke2011-08-151-12/+25
| | | | Reviewed-by: Kristian Høgsberg <[email protected]>
* egl: Native Display autodetectionBenjamin Franzke2011-08-155-8/+117
| | | | | | | | | | | | | | | | | | | | | | | | EGL doesnt define howto manage different native platforms. So mesa has a builtime configurable default platform, whith non-standard envvar (EGL_PLATFORM) overwrites. This caused unneeded bugreports, when EGL_PLATFORM was forgotten. Detection is grouped into basic types of NativeDisplays (which itself needs to be detected). The final decision is based on characteristcs of these basic types: File Desciptor based platforms (fbdev): - fstat(2) to check for being a fd that belongs to a character device - check kernel subsystem (todo) Pointer to structuctures (x11, wayland, drm/gbm): - mincore(2) to check whether its valid pointer to some memory. - magic elements (e.g. pointers to exported symbols): o wayland display stores interface type pointer (first elm.) o gbm stores pointer to its constructor (first elm.) o x11 as a fallback (FIXME?) Reviewed-by: Kristian Høgsberg <[email protected]>