summaryrefslogtreecommitdiff
path: root/src/gallium
AgeCommit message (Collapse)AuthorFilesLines
2014-04-28gallium: add new opcodes for ARB_gs5 bit manipulation supportIlia Mirkin3-1/+93
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-28st/dri: cleanup dri extension handlingEmil Velikov2-25/+30
Explicitly set the version that is implemented, as that may differ from the one defined in dri_interface.h. Use designated initialisers and constify whereever possible. Note: __DRIimageExtension should not be made const as it's modified at runtime. This patch should have no side effects on compilers that do not support designated initialisers, as the existing code in dri/common already uses them. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-04-28util: Fix cross-compiles between endiannessesRichard Sandiford2-32/+46
The old python code used sys.is_big_endian to select between little-endian and big-endian formats, which meant that the build and host endiannesses needed to be the same. This patch instead generates both big- and little- endian layouts, using PIPE_ARCH_BIG_ENDIAN to select between them. Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2014-04-28util: Split out channel-parsing Python codeRichard Sandiford1-46/+50
Splits out the code that parses the channel list, so that we can have different lists for little and big endian. There is no change to the generated u_format_table.c. Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2014-04-28util: Split out channel-printing Python codeRichard Sandiford2-41/+69
Rather than iterate over format.channels and format.swizzles directly, use Python subfunctions that take the channel and swizzle lists as arguments. This allow the channel and swizzle lists to depend on endianness. There is no change to the generated u_format_table.c. Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2014-04-28util: Turn inv_swizzle into a global functionRichard Sandiford2-11/+11
With the big-endian changes, there can be two swizzle orders for each format. This patch turns Format.inv_swizzle() into a global function that takes the swizzle list as a parameter. There is no change to the generated u_format_table.c. Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2014-04-28util: Add more query methods to u_format_parse.FormatRichard Sandiford3-36/+51
The main aim is to reduce the number of places that access channels[0], swizzles[0] and swizzles[1] directly. There is no change to the generated u_format_table.c. Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com> Signed-off-by: José Fonseca <jfonseca@vmware.com>
2014-04-26nvc0/ir: fetch shadow value from proper place for TG4 cube arrayIlia Mirkin1-1/+4
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-26nvc0/ir: set gatherComp for non-shadow targetsIlia Mirkin1-0/+2
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-26nvc0/ir: set instance count based on the GS_INVOCATIONS propertyIlia Mirkin1-3/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-26nvc0/ir: add support for INVOCATIONID system valueIlia Mirkin3-2/+1
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-26nvc0/ir: add support for SAMPLEMASK sysvalIlia Mirkin5-0/+8
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-26gallium: add GS_INVOCATIONS propertyIlia Mirkin3-1/+19
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-26gallium: add INVOCATIONID semanticIlia Mirkin3-2/+10
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-26nvc0: add support for PIPE_CAP_SAMPLE_SHADINGIlia Mirkin15-14/+131
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-26nv50: add support for PIPE_CAP_SAMPLE_SHADINGIlia Mirkin14-8/+107
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-26mesa/st: add support for ARB_sample_shadingIlia Mirkin5-0/+32
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-26gallium: add basic support for ARB_sample_shadingIlia Mirkin19-2/+48
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-25gallium/tests: conditionally include sw/dri winsysEmil Velikov1-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 <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-25automake: cleanup pipe-loader handling when using sw/xlib winsysEmil Velikov4-4/+4
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 <emil.l.velikov@gmail.com>
2014-04-25pipe-loader: conditionally build and use pipe_loader_sw_probe_driEmil Velikov2-0/+6
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 <brianp@vmware.com> Reported-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-25llvmpipe: fix clearing of individual color buffers in a fbRoland Scheidegger6-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 <brianp@vmware.com>
2014-04-25gallium/util: use ui[4] instead of ui in union util_colorRoland Scheidegger11-38/+38
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.)
2014-04-25llvmpipe: (trivial) use correct LP_MIN_VECTOR_ALIGN define for alignment.Roland Scheidegger1-1/+1
Currently it's the same value. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-04-25r600g: fix hang on RV740 by using DX_RASTERIZATION_KILL instead of SX_MISCMarek Olšák5-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 mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-25r600g: fix for an MSAA hang on RV770Marek Olšák3-1/+12
Cc: 10.0 10.1 mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-25r600g: fix for broken CULL_FRONT behavior on R6xxMarek Olšák4-61/+64
Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-25r600g: fix for HTILE on R6xxMarek Olšák1-0/+6
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-25r600g: fix buffer copying on R600-R700Marek Olšák1-0/+6
This fixes broken rendering in DOTA 2. Cc: 10.0 10.1 mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-25r600g: fix flushing on RV670, RS780, RS880 againMarek Olšák1-0/+9
Cc: 10.0 10.1 mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-25r600g: fix MSAA resolve on R6xx when the destination is 1D-tiledMarek Olšák1-0/+6
Cc: 10.0 10.1 mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-25r600g: disable async DMA on R700Marek Olšák1-1/+2
Cc: 10.0 10.1 mesa-stable@lists.freedesktop.org
2014-04-25r600g: fix edge flags and layered rendering on R600-R700Marek Olšák1-2/+4
We forgot to set these bits. Cc: 10.1 mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-25r300g: don't crash when getting NULL colorbuffersMarek Olšák4-29/+60
Cc: mesa-stable@lists.freedesktop.org
2014-04-25r300g: fix runtime warning after winsys cleanupMarek Olšák1-1/+0
Broken by: b2238b3452b0bcf3c1216c20c9918f9f0664b464 winsys/radeon: remove cs_write_reloc, add simpler cs_get_reloc
2014-04-25radeonsi: implement GL_ARB_vertex_type_10f_11f_11f_revMarek Olšák1-0/+6
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-04-24st/xlib: Do minimal version checking in glXCreateContextAttribsARB.José Fonseca1-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 <brianp@vmware.com>
2014-04-24llvmpipe: Advertise GLSL 3.30.José Fonseca1-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 <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-24st/xlib: Honour request of 3.1 contexts through core profile where available.José Fonseca1-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 <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-24draw/llvm: reduce memory usageZack Rusin5-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 <zackr@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: José Fonseca <jfonseca@vmware.com>
2014-04-24gallivm: Fix wrong operator in lp_exec_default.José Fonseca1-1/+1
Courtesy of MSVC static code analyser. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-23util/u_debug: Pass correct size to strncat.José Fonseca1-4/+4
Courtesy of Clang static analyzer. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2014-04-23freedreno/a3xx: fix TOTALATTRTOVSRob Clark4-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 <robclark@freedesktop.org>
2014-04-22st/omx/enc: implement frame reordering and B-framesChristian König2-23/+87
Signed-off-by: Christian König <christian.koenig@amd.com>
2014-04-22st/omx/enc: replace omx buffer with texture bufferLeo Liu1-29/+185
Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2014-04-22radeonsi: Fix calculation of number of banks for SIMichel Dänzer3-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 <marek.olsak@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-04-21svga: move draw debug code into separate functionBrian Paul1-123/+135
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2014-04-21libgl-gdi: silence unused variable warning when not using LLVMBrian Paul1-0/+2
2014-04-19nouveau/codegen: add missing values for OP_TXLQ into the target arraysIlia Mirkin2-7/+9
Also rework things so that if someone were to add an opcode without adjusting the values in these arrays, there will be a compilation error. This fixes a few quadop-related piglit regressions since commit d5faf8e78603. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-19nvc0: change logic for centering of eng2d blit when downsamplingIlia Mirkin1-2/+2
We want to center the sample. The old code may have been correct given the limited values of ms_x/y, but the new logic should be more intuitive. Note that ms_x can only be 1/2 and ms_y can only be 0/1. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>