summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Drop _EnabledUnits.Eric Anholt2014-04-3017-43/+31
| | | | | | | | | | | The field wasn't really valid, since we've got more than 32 units now. It turns out it was mostly just used for checking != 0, or checking for fixed function coordinates, though. v2: Fix mis-conversion in xm_line.c (caught by Ken). Reviewed-by: Matt Turner <mattst88@gmail.com> (v1) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* swrast: Just use _EnabledCoordUnits for figuring out which texcoords to build.Eric Anholt2014-04-301-1/+1
| | | | | | | | | | | | | _EnabledUnits is all of the first 32 image units that are used by fixed function or programs, while _EnabledCoordUnits is just which fixed function fragment shader texcoords need to be generated. This is a theoretical bugfix in the case of a vertex shader texturing from large texture image unit number (we'd end up flagging something other than a VARYING_SLOT_TEXn as needing to be generated), but it's actually just motivated by trying to kill _EnabledUnits. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i915: Redo texture unit walking on i830.Eric Anholt2014-04-301-10/+6
| | | | | | | We now know what the max unit is in the context state. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/vec4: Remove 'mul_arg' from try_emit_mad().Matt Turner2014-04-302-7/+12
| | | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* i965/fs: Remove 'mul_arg' from try_emit_mad().Matt Turner2014-04-302-7/+12
| | | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: change invalid texture swizzle error to GL_INVALID_ENUMBrian Paul2014-04-301-2/+2
| | | | | | | | | The original GL_EXT_texture_swizzle extensions said GL_INVALID_OPERATION was to be generated when the an invalid swizzle was passed to glTexParameter(). But in OpenGL 3.3 and later, the error should be GL_INVALID_ENUM. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* translate_sse: Use the correct buffer index in this fast path.Andreas Hartmetz2014-04-291-1/+3
| | | | | | | | | | | | It is possible that there are multiple input buffers but only one is relevant for translation. Then there will be only a single translation group, which might need to source data from a buffer index != 0. Fixes wrong vertex shader inputs as observed while debugging with an application and driver combination that requires translation of a vertex attribute in a non-trivial set of attributes and input buffers. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* clover: Query drivers for max clock frequencyTom Stellard2014-04-293-1/+8
| | | | | | | | | | | | | | Igor Gnatenko: v2: PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY instead of PIPE_COMPUTE_MAX_CLOCK_FREQUENCY Bruno Jiménez: v3: Drivers report clock in Mhz Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* radeon/compute: Implement PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCYTom Stellard2014-04-293-0/+13
| | | | | | | | | | | | Igor Gnatenko: v2: in define RADEON_INFO_MAX_SCLK use 0x1a instead of 0x19 (upstream changes) Bruno Jiménez: v3: Convert the frequency to MHz from kHz after getting it in 'do_winsys_init' Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
* gallium: Add PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCYTom Stellard2014-04-292-1/+4
| | | | | | | | Bruno Jiménez: v2: Updated the docs v3: Remove trailing comma Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* i965: Fix a few base addresses on Broadwell.Kenneth Graunke2014-04-291-2/+2
| | | | | | | | | | | | | | | | We intended to set these 64-bit addresses to 0, and set the enable bit. But, I accidentally placed the DWord with the high bits first, when it should have been second. This generally worked out, by luck - presumably General State Base Address is initially zero, and ends up remaining that way in our contexts since we bungled the "modify enable" bit. v2: Fix MOCS shift on GSBA. It should be 4, and I had 2. (Caught by Ben Widawsky.) Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
* clover: Stub implementation of CL 1.2 sub-devices.EdB2014-04-293-4/+66
| | | | | | | | | | | The implementation is basically a NOP but it conforms with OpenCL 1.2. [ Francisco Jerez: Initialize property return buffer for CL_DEVICE_PARTITION_PROPERTIES, CL_DEVICE_PARTITION_TYPE, CL_DEVICE_PARTITION_AFFINITY_DOMAIN, and make the latter a scalar rather than a vector. Some clean-up and code style fixes. ] Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* clover: Add clEnqueue{Marker, Barrier}WithWaitList.EdB2014-04-292-7/+43
| | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* clover: Align kernel argument sizes to nearest power of 2Jan Vesely2014-04-291-7/+16
| | | | | | | | | | | v2: use a new variable for aligned size add comment make both vars const only use the aligned value in argument constructors fix comment typo Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* clover: Avoid warnings from references to deprecated CL 1.1 APIs.Francisco Jerez2014-04-291-0/+2
| | | | Acked-by: Tom Stellard <thomas.stellard@amd.com>
* clover: Update OpenCL headers to version 1.2 from Khronos.Francisco Jerez2014-04-291-2/+6
| | | | | | | The C++ headers are *not* updated because they rely on CL 1.2 APIs that we do not implement yet when the core CL 1.2 headers are present. Acked-by: Tom Stellard <thomas.stellard@amd.com>
* nvc0/ir: offset appears to come before the Z refIlia Mirkin2014-04-281-1/+3
| | | | | | | | Fixes textureGatherOffset when used with a shadow sampler. Also verified against blob compiler with textureLodOffset manually (no piglit tests for texture[Lod]Offset + shadow samplers). Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv50/ir: change texture offsets to ValueRefs, allow nonconstIlia Mirkin2014-04-288-20/+61
| | | | | | | This allows us to have non-constant offsets for textureGatherOffset and textureGatherOffsets. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nvc0/ir: do constant folding of extbf/insbfIlia Mirkin2014-04-281-1/+66
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nvc0/ir: add support for MUL_HI tgsi opcodesIlia Mirkin2014-04-281-1/+12
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nvc0/ir: add support for new bitfield manipulation opcodesIlia Mirkin2014-04-287-4/+127
| | | | | | | | | | This adds support for: IBFE, UBFE, BFI, LSB, IMSB, UMSB, BREV, POPC Which are all required for ARB_gs5 support. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* tgsi: add tgsi_exec support for new bit manipulation opcodesIlia Mirkin2014-04-281-0/+172
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* gallium/util: add helpers for bitfield manipulationIlia Mirkin2014-04-281-0/+31
| | | | | | | | Add bitwise reversing and signed MSB helpers for software implementation of the new TGSI opcodes. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* mesa/st: implement new bit manipulation opcodesIlia Mirkin2014-04-281-17/+56
| | | | | | | | | Also pipe through [IU]MUL_HI, MAD, and lower ldexp. This provides coverage of all new ARB_gpu_shader5 functions except uaddCarry, usubBorrow and interpolateAt*. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* gallium: add new opcodes for ARB_gs5 bit manipulation supportIlia Mirkin2014-04-283-1/+93
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* glx/drisw: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-11/+13
| | | | | | | | ... to improve readability of code. 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>
* glx/dri3: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-11/+13
| | | | | | | | ... to improve readability of code. 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>
* glx/dri2: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-13/+13
| | | | | | | | ... to improve readability of code. 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>
* glx/dri: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-13/+13
| | | | | | | | ... to improve readability of code. 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>
* glx/indirect: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-12/+14
| | | | | | | | ... to improve readability of code. Set indirect_screen_vtable as a static const. 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>
* glx/apple: explicitly assign struct components for glx_*_vtableEmil Velikov2014-04-281-11/+14
| | | | | | | | ... to improve readability of code. Set applegl_screen_vtable as a static const. 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>
* egl_dri: rework dri extension handlingEmil Velikov2014-04-282-11/+12
| | | | | | | | | | | Use designated initialisers, and store the extensions pointers as const. The loader extensions __DRIdri2LoaderExtension and __DRIswrastLoaderExtension are setup by the platform backends so they should not be constified. 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>
* gbm: cleanup __DRI*extension handlingEmil Velikov2014-04-282-14/+18
| | | | | | | | Use designated initialisers, store all extension pointers as const and use a const __DRIextensions array over assigning each element individually. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* dri_util: cleanup dri extension handlingEmil Velikov2014-04-282-5/+5
| | | | | | | | | Explicitly set the version that is implemented, as that may differ from the one defined in dri_interface.h. The remaining __DRI*Extensions are treated as constants, so got ahead and declare them as such. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glx/tests: explicitly set __DRI2rendererQueryExtension membersEmil Velikov2014-04-281-4/+4
| | | | | | | While we're here use the typcast'ed name and constify. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glx/dri3: rework __DRIextension handlingEmil Velikov2014-04-282-10/+9
| | | | | | | | Use a const array with the extensions, rather than assigning each one to a fixed size array at runtime. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glx/dri2: rework __DRIextension handlingEmil Velikov2014-04-281-1/+1
| | | | | | | | | | | | Make sure that the DRI*Extensions report the version of the interface implemented over the listed in the headers. While both are currently the same, this may change in the future. v2: Keep loader extensions handling as is. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1) Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* st/dri: cleanup dri extension handlingEmil Velikov2014-04-282-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>
* dri/radeon: use a const __DRIextension arrayEmil Velikov2014-04-282-17/+14
| | | | | | | | | | | | | | | | | | Rather than keeping a separate and unused copy of the screen extensions within the radeon screen, use a constant array that can be used directly with __DRIscreen. [Kristian Høgsberg] The copy in the radeon screen isn't unused, that's where the array is built and stored, the dri screen just points to that. The pattern here was used for cases where the extensions exported by a dri driver could vary at runtime, for example depending on chipset. In this case, it's known at compile time, so it makes sense to use a static const array instead. 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>
* drivers/dri: cleanup dri extension instantiationEmil Velikov2014-04-286-28/+37
| | | | | | | | | | | | | | | | | Uniformly use the typecasted extension name, constify extension instances and use designated initialisers. Set the implemented version of the extension, over the one defined in dri_infertace.h. Patch covers the following extensions: __DRItexBufferExtension __DRIimageExtension __DRIrobustnessExtension __DRI2rendererQueryExtension __DRIdri2LoaderExtension 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>
* dri_interface: Update __DRItexBufferExtensionRec to version 3Emil Velikov2014-04-286-19/+29
| | | | | | | | | | | | | | | | | | | | With commit e59fa4c46c8("dri2: release texture image.") we updated the extension without bumping the version number. The patch itself added an interface required to enable texture_from_pixmap on certain platforms. The new code was effectively never build, as it depended on __DRI_TEX_BUFFER_VERSION >= 3, which never came to be in upstream mesa. This commit bumps the version number, drops the __DRI_TEX_BUFFER_VERSION checks and resolves all the build conflicts. Additionally it add a version check as egl and dri3, as require version 2 of the extension which does not have the releaseTexBuffer hook. Cc: Juan Zhao <juan.j.zhao@intel.com> Cc: Kristian Høgsberg <krh@bitplanet.net> 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>
* Check for dladdr(), rather than assuming we have it if we have RTLD_DEFAULTJon TURNEY2014-04-282-4/+4
| | | | | | | | | | | | Unfortunately, Cygwin defines RTLD_DEFAULT (for glibc compatibility), but can't provide dladdr(), so add a check for dladdr() Since I don't think scons is ever used to build for Cygwin, just set HAVE_DLADDR in SConscript, assuming that if we have RTLD_DEFAULT, we have dladdr(). Cc: Jonathan Gray <jsg@jsg.id.au> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Eric Anholt <eric@anholt.net>
* util: Fix cross-compiles between endiannessesRichard Sandiford2014-04-282-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>
* util: Split out channel-parsing Python codeRichard Sandiford2014-04-281-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>
* util: Split out channel-printing Python codeRichard Sandiford2014-04-282-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>
* util: Turn inv_swizzle into a global functionRichard Sandiford2014-04-282-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>
* util: Add more query methods to u_format_parse.FormatRichard Sandiford2014-04-283-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>
* st/mesa: Fix NULL pointer dereference for incomplete framebuffersMichel Dänzer2014-04-281-1/+6
| | | | | | | | This can happen with glamor, which uses EGL_KHR_surfaceless_context and only explicitly binds GL_READ_FRAMEBUFFER for glReadPixels. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Brian Paul <brianp@vmware.com>
* glsl: fix spelling of derivedChris Forbes2014-04-271-1/+1
| | | | Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
* mesa: overhaul debug namespace supportChia-I Wu2014-04-271-178/+88
| | | | | | | | | | | | | | | | | | _mesa_HashTable is not well-suited for us: it locks a mutex unnecessarily and it does not accept 0 as the key (and have branches to handle 1 specially). What we really need is a sparse array. Whether it should be implemented as a hash table, a list, or a bsearch()-able array requires investigations of the use models. We choose to implement it as a list for now, assuming it is common to have a short list of IDs in each (source, type) namespace. The code is simpler, and the memory footprint is lower. This also fixes several corner cases such as making messages to have different states at different severities. v2: use GLbitfield for State/DefaultState, and add a comment Signed-off-by: Chia-I Wu <olv@lunarg.com> Reviewed-by: Brian Paul <brianp@vmware.com>