summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie2013-12-1340-58/+219
| | | | | | | | | | | | | | | | | | | | | | | This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]> swrast: add support for copy_sub_buffer
* util: fix compile breakageBrian Paul2013-12-121-1/+1
| | | | D'oh!
* util: move variable declaration out of for-loopBrian Paul2013-12-121-1/+3
| | | | To fix MSVC build.
* gallium/util: implement new color clear API in u_blitterMarek Olšák2013-12-121-3/+42
|
* st/mesa: set correct PIPE_CLEAR_COLORn flagsMarek Olšák2013-12-121-11/+26
| | | | This also fixes the clear_with_quad function for glClearBuffer.
* gallium: allow choosing which colorbuffers to clearMarek Olšák2013-12-126-11/+23
| | | | | | | | | | | | | | Required for glClearBuffer, which only clears one colorbuffer attachment. Example: If the first colorbuffer is float and the second one is int: pipe->clear(pipe, PIPE_CLEAR_COLOR0, float_clear_color, ...); pipe->clear(pipe, PIPE_CLEAR_COLOR1, int_clear_color, ...); This doesn't need any driver changes yet, because all drivers just use: if (flags & PIPE_CLEAR_COLOR) .. The drivers which support GL 3.0 will have to implement it properly though.
* st/mesa: fix glClear with multiple colorbuffers and different formatsMarek Olšák2013-12-121-24/+9
| | | | Cc: 10.0 9.2 9.1 <[email protected]>
* mesa: fix interpretation of glClearBuffer(drawbuffer)Marek Olšák2013-12-121-6/+25
| | | | | | | | This corresponding piglit tests supported this incorrect behavior instead of pointing at it. Reviewed-by: Ian Romanick <[email protected]> Cc: 10.0 9.2 9.1 <[email protected]>
* r600g,radeonsi: fix initialized buffer range tracking for DMA, add commentsMarek Olšák2013-12-123-21/+36
| | | | | | | The DMA functions modify dst_offset and size and util_range_add gets wrong values. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: fix binding the dummy pixel shaderMarek Olšák2013-12-123-24/+11
| | | | | | This fixes valgrind errors in glxinfo. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: fix FS_COLOR0_WRITES_ALL_CBUFS with mixed colorbuffer formatsMarek Olšák2013-12-121-25/+15
| | | | | | The 16bpc packing must be done separately for each render target. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use the colorbuffer count from the shader keyMarek Olšák2013-12-123-16/+7
| | | | | | | As a result, the initialization of write_all must be done before the compilation. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove unused variable in si_pipe_shader_psMarek Olšák2013-12-121-8/+1
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: Write htile state to hardware.Andreas Hartmetz2013-12-123-13/+65
|
* radeon: Allocate htile buffer for SI in r600_texture.Andreas Hartmetz2013-12-121-15/+67
|
* radeon: rearrange r600_texture and related code a bit.Andreas Hartmetz2013-12-125-46/+46
| | | | | This should make the differences and similarities between color and depth buffer handling more clear.
* r600g,radeonsi: consolidate buffer code, add handling of DISCARD_RANGE for SIMarek Olšák2013-12-1213-353/+210
| | | | | | | | This adds 2 optimizations for radeonsi: - handling of DISCARD_RANGE - mapping an uninitialized buffer range is automatically UNSYNCHRONIZED Reviewed-by: Michel Dänzer <[email protected]>
* r600g,radeonsi: add common interface for buffer invalidationMarek Olšák2013-12-127-6/+10
| | | | | | This will be used by common code in the next commit. Reviewed-by: Michel Dänzer <[email protected]>
* r600g,radeonsi: consolidate some debug flagsMarek Olšák2013-12-124-4/+5
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g: refactor out code for buffer invalidationMarek Olšák2013-12-123-55/+57
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g,radeonsi: share flags has_cp_dma and has_streamoutMarek Olšák2013-12-1210-26/+28
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: handle PIPE_TRANSFER_DISCARD_WHOLE_RESOURCEMarek Olšák2013-12-123-0/+135
| | | | | | which can come from glBufferData and glMapBufferRange. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: implement accelerated buffer copyingMarek Olšák2013-12-123-4/+64
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* r600g: use common interfaces in buffer_transfer_unmapMarek Olšák2013-12-125-14/+22
| | | | | | i.e. dma_copy and resource_copy_region. Reviewed-by: Michel Dänzer <[email protected]>
* radeon: move some functions to r600_buffer_common.cMarek Olšák2013-12-124-130/+161
| | | | | | | | Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christoph Brill <[email protected]> v2: Renamed r600_buffer.c to r600_buffer_common.c. The stupid build system doesn't allow 2 files of the same name in different directories.
* winsys/radeon: set/get the scanout flag with the tiling ioctlsMarek Olšák2013-12-125-11/+22
| | | | | | | | | | | | | | | If we assume that all buffers allocated by the DDX are scanout, a new flag that says "this is not scanout" has to be added to support the non-scanout buffers and maintain backward compatibility. This fixes bad rendering on Wayland. The flag is defined as: #define RADEON_TILING_R600_NO_SCANOUT RADEON_TILING_SWAP_16BIT AFAIK, RADEON_TILING_SWAP_16BIT is not used on SI. Reviewed-by: Michel Dänzer <[email protected]>
* glsl: modify ir_clone to use memcpyTapani Pälli2013-12-121-20/+3
| | | | | | | | Patch copies the whole data structure at once instead of assigning individual variables. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: move variables in to ir_variable::data, part IITapani Pälli2013-12-1231-411/+421
| | | | | | | | | | | | | This patch moves following bitfields and variables to the data structure: explicit_location, explicit_index, explicit_binding, has_initializer, is_unmatched_generic_inout, location_frac, from_named_ifc_block_nonarray, from_named_ifc_block_array, depth_layout, location, index, binding, max_array_access, atomic Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: move variables in to ir_variable::data, part ITapani Pälli2013-12-1246-307/+308
| | | | | | | | | | This patch moves following bitfields in to the data structure: used, assigned, how_declared, mode, interpolation, origin_upper_left, pixel_center_integer Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: introduce data section to ir_variableTapani Pälli2013-12-1218-75/+83
| | | | | | | | Data section helps serialization and cloning of a ir_variable. This patch includes the helper bits used for read only ir_variables. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* mesa: fix a typo in glDetachShader error messageTapani Pälli2013-12-121-1/+1
| | | | | Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* svga: expose HW smooth/stipple/wide linesBrian Paul2013-12-117-14/+99
| | | | | | | Newer virtual HW versions support smooth/stipple/wide lines. Use that instead of 'draw' fallbacks when possible. Reviewed-by: José Fonseca <[email protected]>
* glx: Add missing null check in DRI2WireToEventJuha-Pekka Heikkila2013-12-111-0/+2
| | | | | Signed-off-by: Juha-Pekka Heikkila <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: add plumbing for ARB_depth_clampMatthew McClure2013-12-114-35/+62
| | | | | | | | | | With this patch llvmpipe will adhere to the ARB_depth_clamp enabled state when clamping the fragment's zw value. To support this, the variant key now includes the depth_clamp state. key->depth_clamp is derived from pipe_rasterizer_state's (depth_clip == 0), thus depth clamp is only enabled when depth clip is disabled. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* r600g/sb: fix stack size computation on evergreenVadim Girlin2013-12-111-4/+12
| | | | | | | | | | | | | | | | On evergreen we have to reserve 1 stack element in some additional cases besides the ones mentioned in the docs, but stack size computation was recently reimplemented exactly as described in the docs by the patch that added workarounds for stack issues on EG/CM, resulting in regressions with some apps (Serious Sam 3). This patch fixes it by restoring previous behavior. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=72369 Signed-off-by: Vadim Girlin <[email protected]> Cc: "10.0" <[email protected]> Tested-by: Andre Heider <[email protected]>
* llvmpipe: add a very useful (disabled) debugging outputZack Rusin2013-12-101-0/+20
| | | | | | | | Disabled by default, but it's very useful when needed. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw: fix vbuf caching of vertices with inject front faceZack Rusin2013-12-101-0/+1
| | | | | | | | | | | | | | | Caching in the vbuf module meant that once a vertex has been emitted it was cached, but it's possible for a vertex at the same location to be emitted again, but this time with a different front-face semantic. Caching was causing the first version of the vertex to be emitted, which resulted in the renderer getting incorrect front-face attributes. By reseting the vertex_id (which is used for caching) we make sure that once a front-face info has been injected the vertex will endup getting emitted. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* llvmpipe: fix blending with half-float formatsZack Rusin2013-12-103-5/+108
| | | | | | | | | | | | | The fact that we flush denorms to zero breaks our half-float conversion and blending. This patches enables denorms for blending. It's a little tricky due to the llvm bug that makes it incorrectly reorder the mxcsr intrinsics: http://llvm.org/bugs/show_bug.cgi?id=6393 Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Zack Rusin <[email protected]>
* svga/winsys: Implement surface sharing using prime fd handlesThomas Hellstrom2013-12-102-18/+74
| | | | | | | | | | This needs a prime-aware vmwgfx kernel module to work properly. (With additions by Christopher James Halse Rogers <[email protected]>) Signed-off-by: Christopher James Halse Rogers <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium/radeon: Implement hooks for DRI Image 7 (v2)Christopher James Halse Rogers2013-12-104-24/+141
| | | | | | | | | v2: Fix transliteration of lseek arguments Ignore busy return from RADEON_GEM_BUSY ioctl; we're only after the domain Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* radeon: Rename bo_handles hashtable to match its actual contents.Christopher James Halse Rogers2013-12-101-8/+8
| | | | | | | | It's a map of GEM name->bo, so identify it as such Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* ilo: Support DRI Image 7Christopher James Halse Rogers2013-12-102-3/+18
| | | | | | Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* nouveau: Support DRI Image 7 extensionMaarten Lankhorst2013-12-102-3/+26
| | | | | | Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Christopher James Halse Rogers <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium/dri: Support DRI Image extension version 7Christopher James Halse Rogers2013-12-102-10/+106
| | | | | | | | | | | v2: Fix up queryImage return for ATTRIB_FD Use driver_descriptor.configuration to determine whether the driver supports DMA-BUF import/export. v3: Really, truly, fix up queryImage return for ATTRIB_FD Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium/dri2: Set winsys_handle type to KMS for stride query.Christopher James Halse Rogers2013-12-101-0/+1
| | | | | | | | | Otherwise the default is TYPE_SHARED, which will flink the bo. This seems rather unnecessary for a simple stride query. Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium/winsys/drm: Prepare for passing prime fds in winsys_handleChristopher James Halse Rogers2013-12-109-4/+38
| | | | | | Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* gallium/dri: Support DRI Image extension version 6Christopher James Halse Rogers2013-12-101-1/+71
| | | | | | | | | | v2: Pick out the correct gl_context pointer v3: Don't leak pipe_resources on error path Set img->dri_format correctly Signed-off-by: Christopher James Halse Rogers <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]>
* nv50: report 15 max inputs for fragment programsIlia Mirkin2013-12-101-1/+1
| | | | | | | | | | | | First off, nv50_program only has 16 in/out varyings. However reporting 16 makes 'm' become 68 in nv50_fp_linkage_validate with the varying-packing-simple piglit test. (Subverting the assert makes it compile but fail.) With this patch, varying-packing-simple passes. See: https://bugs.freedesktop.org/show_bug.cgi?id=69155 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "9.2 10.0" <[email protected]>
* nouveau: Fix compiler warning regressionMaarten Lankhorst2013-12-101-4/+0
| | | | | | cfg is now unused, remove it. Cc: "10.0" <[email protected]>
* swrast: fix readback regression since inversion fixDave Airlie2013-12-101-1/+1
| | | | | | | | | | | | | | | This readback from the frontbuffer with swrast was broken, that bug just made it more obviously broken, this fixes it by inverting the sub image gets. Also fixes a few other piglits. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72327 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72325 (for 9.2 the patches this depends on were asked to be backported separately in an email). Cc: "9.2" "10.0" [email protected] Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>