aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Use properly typed arguments for bitfieldInsert.Matt Turner2014-04-251-2/+2
| | | | | | | | bitfieldInsert takes scalar integers for its last two arguments. Since bitfieldInsert is lowered on i965 to two instructions that have more flexible arguments, I didn't notice when I wrote this. Reviewed-by: Ilia Mirkin <[email protected]>
* i965: Don't bother flushing the batch if it doesn't ref our mt to map.Eric Anholt2014-04-251-1/+2
| | | | | | -1.1372% +/- 0.858033% effect on cairo runtime on glamor (n=175). Reviewed-by: Kenneth Graunke <[email protected]>
* egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORMAnder Conselvan de Oliveira2014-04-251-0/+2
| | | | | | | Otherwise it fails to compile if the drm egl platform is disabled. Cc: "10.0" "10.1" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* wayland: Fix the logic in disabling the prime capabilityNeil Roberts2014-04-251-1/+1
| | | | | | | | | | It looks like this bit of code is trying to disable the prime capability if the driver doesn't support createImageFromFds. However the logic looks a bit broken and what it would actually do is disable all other capabilities apart from prime. This patch fixes it to actually disable prime. Cc: "10.0" "10.1" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gbm: Set errno on errorsAnder Conselvan de Oliveira2014-04-252-15/+41
| | | | | | | | | This should give the caller some information of what called the error. For the gbm_bo_import() case, for instance, it is possible to know if the import is not supported or the error was caused by an invalid parameter. Reviewed-by: Emil Velikov <[email protected]>
* gbm/dri: Fix out-of-memory error path in dri_device_create()Ander Conselvan de Oliveira2014-04-251-0/+2
| | | | | Cc: "10.0" "10.1" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/tests: conditionally include sw/dri winsysEmil Velikov2014-04-251-1/+5
| | | | | | | | | | | In all fairness we allow the gallium tests to be build with --disable-dri which will result in the approapriate winsys to not be build, thus the build will fail. ./configure --disable-dri --with-gallium-drivers=svga --enable-gallium-tests Cc: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* automake: cleanup pipe-loader handling when using sw/xlib winsysEmil Velikov2014-04-255-8/+5
| | | | | | | Rather than defining our own set of variables, use NEED_WINSYS_XLIB and based on it include the sw/xlib winsys. Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: conditionally build and use pipe_loader_sw_probe_driEmil Velikov2014-04-253-0/+10
| | | | | | | | | | | | | The function relies on the sw/dri winsys which is build only when --enable-dri is set. Fixes build issues with the following config ./configure --disable-dri --with-gallium-drivers=svga --enable-xa Issue can be reproduced with any hw gallium driver + st that uses the pipe-loader. Cc: Brian Paul <[email protected]> Reported-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* llvmpipe: fix clearing of individual color buffers in a fbRoland Scheidegger2014-04-256-163/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GL (3.0) allows you to clear individual color buffers in a fb. In fact for fbs containing both int and float/normalized color buffers this is required (because the clearing values are otherwise undefined if applied to all buffers). The gallium interface was changed a while ago, but llvmpipe ignored it (hence doing such individual clears always resulted in clearing all buffers, plus some assorted asserts due to the mixed fbs). So change the clear command to indicate the buffer to be cleared. Also, because indicating the buffer to be cleared would have made lp_rast_arg_cmd larger which is unacceptable (we're trying to shrink it some day) allocate the clear value in the scene and just pass a pointer. There's several advantages and disadvantages here: + clearing individual buffers works (we could also actually bin such clears now if they'd come through clear_render_target() if the surface is in the current fb, though we didn't do this before for the single rb case and still don't try). + since there's one clear per rb, we do the format conversion in setup rather than per bin. Aside from the (drop in the ocean...) performance advantage this means that clearing to very small values (that is, denormal when converted to the format) should work for small float (fp16 etc.) formats, as the util code couldn't handle it correctly before (because cpu denorms are disabled when executing the bin commands, screwing up the magic conversion and flushing the values to 0, though this was not verified). - there's some overhead for traditional old-style clear-all MRT cases, since there's one rast clear command per rb instead of one for all rbs. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=76976. v2: get rid of the ugly manual memcpy stuff and just use union util_color. This is 32 bytes instead of 16 but as the allocation is per scene we can live with those additional 16 bytes (and the additional 128 bytes in the setup context), which makes the code much more obvious. Suggested by Brian. Reviewed-by: Brian Paul <[email protected]>
* gallium/util: use ui[4] instead of ui in union util_colorRoland Scheidegger2014-04-2512-39/+39
| | | | | | | | util_color often merely represents a collection of bytes, however it is inconvenient if those bytes can only be accessed as floats/doubles for int formats exceeding 32bits. (Note that since rgba8 formats use one uint, not 4 bytes, hence the byte and short member were left as is.)
* llvmpipe: (trivial) use correct LP_MIN_VECTOR_ALIGN define for alignment.Roland Scheidegger2014-04-251-1/+1
| | | | | | Currently it's the same value. Reviewed-by: Brian Paul <[email protected]>
* r600g: fix hang on RV740 by using DX_RASTERIZATION_KILL instead of SX_MISCMarek Olšák2014-04-255-7/+27
| | | | | | | | Changing SX_MISC hangs RV740. When we're at it, let's use DX_RASTERIZATION_KILL on all R700 and later chipsets. Cc: 10.0 10.1 [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g: fix for an MSAA hang on RV770Marek Olšák2014-04-253-1/+12
| | | | | Cc: 10.0 10.1 [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g: fix for broken CULL_FRONT behavior on R6xxMarek Olšák2014-04-254-61/+64
| | | | | Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g: fix for HTILE on R6xxMarek Olšák2014-04-251-0/+6
| | | | Reviewed-by: Alex Deucher <[email protected]>
* r600g: fix buffer copying on R600-R700Marek Olšák2014-04-251-0/+6
| | | | | | | This fixes broken rendering in DOTA 2. Cc: 10.0 10.1 [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g: fix flushing on RV670, RS780, RS880 againMarek Olšák2014-04-251-0/+9
| | | | | Cc: 10.0 10.1 [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g: fix MSAA resolve on R6xx when the destination is 1D-tiledMarek Olšák2014-04-251-0/+6
| | | | | Cc: 10.0 10.1 [email protected] Reviewed-by: Alex Deucher <[email protected]>
* r600g: disable async DMA on R700Marek Olšák2014-04-251-1/+2
| | | | Cc: 10.0 10.1 [email protected]
* r600g: fix edge flags and layered rendering on R600-R700Marek Olšák2014-04-251-2/+4
| | | | | | | We forgot to set these bits. Cc: 10.1 [email protected] Reviewed-by: Alex Deucher <[email protected]>
* st/mesa: remove trailing NULL colorbuffersMarek Olšák2014-04-251-0/+6
| | | | | Cc: [email protected] Reviewed-by: Brian Paul <[email protected]>
* r300g: don't crash when getting NULL colorbuffersMarek Olšák2014-04-254-29/+60
| | | | Cc: [email protected]
* r300g: fix runtime warning after winsys cleanupMarek Olšák2014-04-251-1/+0
| | | | | | Broken by: b2238b3452b0bcf3c1216c20c9918f9f0664b464 winsys/radeon: remove cs_write_reloc, add simpler cs_get_reloc
* radeonsi: implement GL_ARB_vertex_type_10f_11f_11f_revMarek Olšák2014-04-253-1/+8
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* st/xlib: Do minimal version checking in glXCreateContextAttribsARB.José Fonseca2014-04-241-19/+1
| | | | | | | | | | The current version checking is wrongly refusing to create 3.3 contexts; unsupported version are checked elsewhere; and the DRI path doesn't do this sort of checking neither. This enables piglit glsl 3.30 tests to run without skipping. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: Advertise GLSL 3.30.José Fonseca2014-04-241-1/+1
| | | | | | | | | | According to Roland all TGSI support is there in theory. In practice there are a few piglit failures and crashes, as this hadn't been tested before. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* st/xlib: Honour request of 3.1 contexts through core profile where available.José Fonseca2014-04-241-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The GLX_ARB_create_context_profile spec says: "If version 3.1 is requested, the context returned may implement any of the following versions: * Version 3.1. The GL_ARB_compatibility extension may or may not be implemented, as determined by the implementation. * The core profile of version 3.2 or greater." Mesa does not support GL_ARB_compatibility, and there are no plans to ever support it, therefore the only chance to honour a 3.1 context is through core profile, i.e, the 2nd alternative from the spec. This change does that. And with it piglit tests that require 3.1 contexts no longer skip. Assuming there is no objection with this change, src/glx/dri_common.c and src/gallium/state_trackers/wgl/stw_context.c should also be updated accordingly, given they have the same logic. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* draw/llvm: reduce memory usageZack Rusin2014-04-245-20/+27
| | | | | | | | | | Lets make draw_get_option_use_llvm function available unconditionally and use it to avoid useless allocations when LLVM paths are active. TGSI machine is never used when we're using LLVM. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* docs: fix typo in 10.1.1 release notes URLBrian Paul2014-04-241-1/+1
|
* swrast: move texture_slices() calls out of loopsBrian Paul2014-04-241-4/+8
| | | | Reviewed-by: José Fonseca <[email protected]>
* swrast: move null pointer check earlier in _swrast_map_teximage()Brian Paul2014-04-241-6/+9
| | | | | | | There's no reason to compute texel size, stride, etc. if there's no image data to map. Reviewed-by: José Fonseca <[email protected]>
* swrast: remove _mesa_ prefix from static functionBrian Paul2014-04-241-3/+3
| | | | | | And add a const qualifier. Reviewed-by: José Fonseca <[email protected]>
* swrast: allocate swrast_texture_image::ImageSlices array if neededBrian Paul2014-04-241-0/+10
| | | | | | | | | | | Fixes a segmentation fault in conform divzero.c test. This happens when glTexImage(level, width=0, height=0) is called. We don't allocate texture memory in that case so the ImageSlices array was never allocated. Cc: "10.1" <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* swrast: Fix vertex color in _swsetup_Translate()nick2014-04-241-1/+2
| | | | | | | | | | Straightforward fix to properly load dest->color with color data, as opposed to position data as previously implemented. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27499 Cc: "10.1" <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallivm: Fix wrong operator in lp_exec_default.José Fonseca2014-04-241-1/+1
| | | | | | Courtesy of MSVC static code analyser. Reviewed-by: Roland Scheidegger <[email protected]>
* mesa/st: Handle empty frame-buffers without asserting.José Fonseca2014-04-241-5/+4
| | | | | | Fixes assertion failures with radeonsi. Tested-by: Marek Olšák <[email protected]>
* mesa/st: Fix pipe_framebuffer_state::height for PIPE_TEXTURE_1D_ARRAY.José Fonseca2014-04-231-2/+33
| | | | | | | | | | | | | This prevents buffer overflow w/ llvmpipe when running piglit bin/gl-3.2-layered-rendering-clear-color-all-types 1d_array single_level -fbo -auto v2: Compute the framebuffer size as the minimum size, as pointed out by Brian; compacted code; ran piglit quick test list (with no regressions.) Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* util/u_debug: Pass correct size to strncat.José Fonseca2014-04-231-4/+4
| | | | | | | Courtesy of Clang static analyzer. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* freedreno/a3xx: fix TOTALATTRTOVSRob Clark2014-04-234-1/+7
| | | | | | | | | In cases where varying fetches are optimized away (just pass-through in vertex shader, but unused in fragment shader) we need to calculate the correct TOTALATTROVS based on the actual number of varyings fetched, otherwise lockup. Signed-off-by: Rob Clark <[email protected]>
* i965: Make Broadwell HiZ path arrange for TC flushes.Kenneth Graunke2014-04-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | HiZ operations make the depth/render caches out of sync with the sampler caches. We need to arrange for a TC flush to happen before the target buffer is used by the sampler. Calling brw_render_cache_set_add_bo makes that happen. On previous generations, brw_blorp_exec took care of flushing the texture cache by calling intel_batchbuffer_emit_mi_flush after doing any rendering. If we were to use the normal drawing path, then brw_postdraw_set_buffers_need_resolve would handle this. On Broadwell, we don't use BLORP, and we don't emit a rectangle primitive via the normal drawing path. The 3DSTATE_WM_HZ_OP and PIPE_CONTROL implicitly make drawing happen. So, none of our existing code makes this flush happen - we need to do it directly. Fixes 11 Piglit copyteximage subtests. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77223 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77226 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* i965: Use uint16_t for control/src index tables.Matt Turner2014-04-221-14/+14
| | | | | | No need to use 32-bits to store 15 and 12. Reviewed-by: Anuj Phogat <[email protected]>
* i965/disasm: Fix s/xoo/xor/ typo.Matt Turner2014-04-221-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/disasm: Remove tables with obvious mappings.Matt Turner2014-04-222-13/+2
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* mesa/st: enable EXT_shader_integer_mix when NativeIntegers is onIlia Mirkin2014-04-221-0/+4
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/omx/enc: implement frame reordering and B-framesChristian König2014-04-222-23/+87
| | | | Signed-off-by: Christian König <[email protected]>
* st/omx/enc: replace omx buffer with texture bufferLeo Liu2014-04-221-29/+185
| | | | | Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
* radeonsi: Fix calculation of number of banks for SIMichel Dänzer2014-04-223-16/+20
| | | | | | | | | | | | The way cik_num_banks() was calculating the index only makes sense for the CIK specific macrotile mode array. For SI, we need to use the tile mode index directly. This happened to work most of the time because most of the SI tiling modes use the same number of banks. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* glsl: Only allow `invariant` on shader in/out between stages.Chris Forbes2014-04-221-23/+8
| | | | | | | | | | | | | | | | | | | | | Previously this was special-cased for VS and FS; it never got updated when geometry shaders came along. Generalize using is_varying_var() so this won't be broken again with tessellation. Note that there are two copies of the logic for `invariant`: It can be present as part of a new declaration, and also as a redeclaration of an existing variable or block member. Fixes the four new piglits: spec/glsl-1.50/compiler/invariant-qualifier-*.geom Note for stable: This won't quite pick cleanly due to whitespace and state->target -> state->stage renames. Should be straightforward adjustments though. Cc: "10.0 10.1" <[email protected]> Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* svga: move draw debug code into separate functionBrian Paul2014-04-211-123/+135
| | | | Reviewed-by: Charmaine Lee <[email protected]>