Francisco Jerez [Sat, 12 May 2012 17:24:09 +0000 (19:24 +0200)]
clover: Check the total work-group size provided to clEnqueueNDRangeKernel.
Christoph Bumiller [Sat, 12 May 2012 17:32:46 +0000 (19:32 +0200)]
clover, gallium: add PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK
This is not necessarily the product of MAX_BLOCK_SIZE[i].
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Francisco Jerez [Sat, 12 May 2012 17:08:43 +0000 (19:08 +0200)]
r600g: Handle compute caps.
Francisco Jerez [Sat, 12 May 2012 17:17:13 +0000 (19:17 +0200)]
r300g: Handle compute caps.
José Fonseca [Sat, 12 May 2012 16:23:52 +0000 (17:23 +0100)]
auxiliary/util: Ensure pipe_constant_buffer::user_buffer is initialized.
José Fonseca [Sat, 12 May 2012 16:08:30 +0000 (17:08 +0100)]
scons: Fix missing gbm symbols in st/egl.
José Fonseca [Sat, 12 May 2012 16:00:11 +0000 (17:00 +0100)]
targets/egl-static: Fix some missing symbols.
José Fonseca [Sat, 12 May 2012 15:59:41 +0000 (16:59 +0100)]
trace: Fix pipe_context::clear dumping.
José Fonseca [Sat, 12 May 2012 15:59:22 +0000 (16:59 +0100)]
trace: Fix pipe_shader_state dumping.
José Fonseca [Fri, 23 Mar 2012 10:52:47 +0000 (10:52 +0000)]
scons: Link r600_drm.so against libdrm-radeon
José Fonseca [Sat, 12 May 2012 15:31:25 +0000 (16:31 +0100)]
trace: Match NULL context members.
Marek Olšák [Sat, 12 May 2012 10:25:33 +0000 (12:25 +0200)]
gallium/docs: remove documentation of redefine_user_buffer
Michel Dänzer [Fri, 11 May 2012 14:19:19 +0000 (16:19 +0200)]
radeonsi: Fixed point vertex formats aren't supported.
Michel Dänzer [Sat, 12 May 2012 10:12:21 +0000 (12:12 +0200)]
radeonsi: Fixups for recent build infrastructure changes.
In particular for the pipe loader changes.
Dave Airlie [Fri, 27 Apr 2012 08:38:46 +0000 (09:38 +0100)]
r600g: setup COLOR1 for possible dual-src in the framebuffer bind
As pointed out by Marek, if we have only one cb, we may as well add this
single register write here rather than adding it in the draw loop.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Roy Spliet [Sat, 12 May 2012 01:42:31 +0000 (03:42 +0200)]
nv30: Silence pipe_cap warnings
Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Roy Spliet [Sat, 12 May 2012 01:42:30 +0000 (03:42 +0200)]
nv30/shader: SSG, LIT only requires one source register
Fixes crashing due to assertion error
Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 10 May 2012 17:02:13 +0000 (03:02 +1000)]
nouveau/vieux: finish != flush, how about we do that..
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Marek Olšák [Fri, 11 May 2012 21:33:50 +0000 (23:33 +0200)]
r300g/swtcl: move vertex buffer updates into set_vertex_buffers
Marek Olšák [Fri, 11 May 2012 21:33:50 +0000 (23:33 +0200)]
r300g/swtcl: move index buffer updates from swtcl_draw_vbo into set_index_buffer
Marek Olšák [Fri, 11 May 2012 21:22:21 +0000 (23:22 +0200)]
r300g/swtcl: malloc vertex and index buffers (don't use radeon DRM to get them)
Vertex and index buffers are never used by hardware, only by Draw.
SWTCL chipsets usually have very little memory, so this might help
with stability and reliability.
Marek Olšák [Fri, 11 May 2012 21:09:05 +0000 (23:09 +0200)]
r300g/swtcl: don't do stuff which is only for HWTCL
Marek Olšák [Fri, 11 May 2012 20:56:08 +0000 (22:56 +0200)]
r300g: remove slab allocator for pipe_resource (used mainly for user buffers)
Marek Olšák [Fri, 11 May 2012 20:34:34 +0000 (22:34 +0200)]
r300g: remove user_buffer_create
Marek Olšák [Fri, 11 May 2012 20:25:03 +0000 (22:25 +0200)]
r300g: fix breakage after gallium-userbuf merge
Brian Paul [Fri, 11 May 2012 22:16:11 +0000 (16:16 -0600)]
llvmpipe: add cast to silence warning
Andreas Betz [Fri, 11 May 2012 13:29:06 +0000 (07:29 -0600)]
vega: fix 565 color unpacking bug
NOTE: This is a candidate for the 8.0 branch.
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Wed, 9 May 2012 18:09:21 +0000 (12:09 -0600)]
mesa: add DEBUG_INCOMPLETE_TEXTURE, DEBUG_INCOMPLETE_FBO flags
Instead of having to hack the code to enable these debugging options,
set them through the MESA_DEBUG env var.
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 9 May 2012 18:08:47 +0000 (12:08 -0600)]
mesa: implement DEBUG_ALWAYS_FLUSH debug option
This flag has been around for a while but it wasn't actually used anywhere.
Now, setting this flag causes a glFlush() to be issued after each
drawing call (including glBegin/End, glDrawElements, glDrawArrays,
glDrawPixels, glCopyPixels and glBitmap).
Brian Paul [Wed, 9 May 2012 19:25:00 +0000 (13:25 -0600)]
mesa: define DEBUG_SILENT flag, use in output_if_debug()
Brian Paul [Wed, 9 May 2012 18:07:28 +0000 (12:07 -0600)]
mesa: clean-up the debug/verbose flag setup code
Split the verbose and debug flag setup code into separate functions.
Brian Paul [Wed, 9 May 2012 17:56:10 +0000 (11:56 -0600)]
mesa: do FLUSH_VERTICES() in _mesa_flush/finish()
This was being done in the _mesa_Flush/Finish() calls but if there
was an internal call to _mesa_flush/finish() the FLUSH_VERTICES()
wouldn't happen. Looks like only the intel and radeon drivers made
such calls in MakeCurrent().
Brian Paul [Tue, 8 May 2012 17:41:03 +0000 (11:41 -0600)]
mesa: fix glMaterial / dlist bug
When glColorMaterial() is used to latch glColor commands to a material
attribute, glMaterial calls to change that material should become no-ops.
This failed to work properly when the glMaterial call was inside a
display list.
This removes the Material function from the vbo_attrib_tmp.h template
file. We have separate/different implementations for the "save" and
"exec" cases now.
NOTE: This is a candidate for the 8.0 branch.
Brian Paul [Tue, 8 May 2012 16:22:20 +0000 (10:22 -0600)]
mesa: fix/add error check in _mesa_ColorMaterial()
_mesa_material_bitmask() will record a GL error and return 0 if
face or mode are illegal. Return early in that case.
NOTE: This is a candidate for the 8.0 branch.
Tom Stellard [Fri, 11 May 2012 17:44:24 +0000 (13:44 -0400)]
radeon/llvm: More comments and cleanups
José Fonseca [Fri, 11 May 2012 15:43:28 +0000 (16:43 +0100)]
gallivm: Fix copy'n'paste typo bug translating CEIL opcode.
Trivial.
Marek Olšák [Fri, 11 May 2012 15:34:26 +0000 (17:34 +0200)]
r600g: assume DISCARD_WHOLE_RESOURCE is always used with WRITE
Marek Olšák [Fri, 11 May 2012 14:42:20 +0000 (16:42 +0200)]
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa
Marek Olšák [Fri, 11 May 2012 14:38:13 +0000 (16:38 +0200)]
Merge branch 'gallium-userbuf'
Conflicts:
src/gallium/docs/source/screen.rst
src/gallium/drivers/nv50/nv50_state.c
src/gallium/include/pipe/p_defines.h
src/mesa/state_tracker/st_draw.c
Tom Stellard [Fri, 11 May 2012 13:31:00 +0000 (09:31 -0400)]
radeon/llvm: Fix Evergreen/Cayman tablegen predicates
Some Evergreen/Cayman instructions were being enabled for SI.
José Fonseca [Fri, 11 May 2012 12:41:56 +0000 (13:41 +0100)]
gallium/tgsi: s/TGSI_BUFFER/TGSI_TEXTURE_BUFFER/
For consistency.
Reviewed-by: Brian Paul <brianp@vmware.com>
José Fonseca [Fri, 11 May 2012 12:36:46 +0000 (13:36 +0100)]
gallium/tgsi: Redefine the TGSI_TEXTURE_UNKNOWN texture target.
Some code relies on the existing of an invalid texture target. It seems
safer to bring it back than to deal with unintended consequences.
This partially reverts commit
a4ebb04214bab1cd9bd41967232ec89441e31744.
Reviewed-by: Brian Paul <brianp@vmware.com>
James Benton [Thu, 10 May 2012 16:15:28 +0000 (17:15 +0100)]
llvmpipe: Fix triangle bounding box calculation to be correctly inclusive or exclusive
Tested with custom rasterisation test tool added to piglit suite, reduced errors
Signed-off-by: José Fonseca <jfonseca@vmware.com>
James Benton [Thu, 10 May 2012 16:15:27 +0000 (17:15 +0100)]
llvmpipe: Change triangle rasterization comparison from < 0 to <= 0
Tested with custom rasterisation test tool added to piglit suite, reduced errors
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Francisco Jerez [Fri, 4 May 2012 13:02:21 +0000 (15:02 +0200)]
clover: Implement CL_MEM_COPY_HOST_PTR.
Alexey Shvetsov [Tue, 10 Apr 2012 22:11:56 +0000 (01:11 +0300)]
gallium/targets/pipe-loader: Prepend DESTDIR to the installation directory.
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Tom Stellard [Fri, 20 Apr 2012 14:56:46 +0000 (16:56 +0200)]
clover: Assorted build fixes.
Contains the following patches squashed in:
commit
9fff1dc0875f7c9591550fa3ebbe1ba7a18483fa
Author: Tom Stellard <thomas.stellard@amd.com>
Date: Tue Mar 20 23:20:03 2012 +0100
configure.ac: Build gallium loader when OpenCL is enabled
commit
542111cb02957418c6a285cb6ef2924e49adc66e
Author: Tom Stellard <thomas.stellard@amd.com>
Date: Tue Mar 20 23:30:29 2012 +0100
configure.ac: Add sw/null to GALLIUM_WINSYS_DIRS for gallium loader
commit
876f8de46062dde76b6075be3b6628f969b16648
Author: Tom Stellard <thomas.stellard@amd.com>
Date: Thu Feb 9 11:26:05 2012 -0500
configure.ac: Require gcc > 4.6.0 for clover
commit
99049d50fa3d9a23297ae658189c19c89dca1766
Author: Tom Stellard <thomas.stellard@amd.com>
Date: Tue Mar 20 23:32:06 2012 +0100
configure.ac: Require Gallium drm loader when gallium loader is enabled
No longer silently exclude this when building OpenCL drivers
for nouveau and r600.
Francisco Jerez [Fri, 20 Apr 2012 14:56:19 +0000 (16:56 +0200)]
clover: Import OpenCL state tracker.
Francisco Jerez [Tue, 20 Mar 2012 22:41:09 +0000 (23:41 +0100)]
gallium/tests/trivial: Import compute unit tests.
Add a test program that tries to exercise some of the language
features commonly used by compute programs at the Gallium API level:
- Correctness of the values returned by the grid parameters.
- Proper functioning of resource LOADs and STOREs.
- Subroutine calls.
- Argument passing to the compute parameter through the INPUT
memory space.
- Mapping of buffer objects to the GLOBAL memory space.
- Proper functioning of the PRIVATE and LOCAL memory spaces.
- Texture sampling and constant buffers.
- Support for multiple kernels in the same program.
- Indirect resource indexing.
- Formatted resource loads and stores (i.e. with channel conversion
and scaling) using several different formats.
- Proper functioning of work-group barriers.
- Atomicity and semantics of the atomic opcodes.
As of now all of them seem to pass on my nvA8.
Francisco Jerez [Fri, 20 Apr 2012 14:31:23 +0000 (16:31 +0200)]
gallium/gbm: Switch to auxiliary/pipe-loader.
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Francisco Jerez [Wed, 25 Apr 2012 20:16:26 +0000 (22:16 +0200)]
gallium/tests/trivial: Switch to the pipe loader.
It simplifies things slightly, and besides, it makes possible to
execute the trivial tests on a hardware device instead of being
limited to software rendering.
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Francisco Jerez [Fri, 25 Nov 2011 13:26:00 +0000 (14:26 +0100)]
gallium: Add "pipe-loader" target.
This target generates pipe driver modules intended to be consumed by
auxiliary/pipe-loader. Most of it was taken from the "gbm" target --
the duplicated code will be replaced with references to this target in
a future commit.
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Francisco Jerez [Wed, 25 Apr 2012 20:16:00 +0000 (22:16 +0200)]
gallium: Add pipe loader for device enumeration and driver multiplexing.
The goal is to have a uniform interface to create winsys and
pipe_screen instances for any driver, exposing the device enumeration
capabilities that might be supported by the operating system (for now
there's a "drm" back-end using udev and a "sw" back-end that always
returns the same built-in devices).
The typical use case of this library will be:
>
> struct pipe_loader_device devs[n];
> struct pipe_screen *screen;
>
> pipe_loader_probe(&devs, n);
>[pick some device from the array...]
>
> screen = pipe_loader_create_screen(dev, library_search_path);
>[do something with screen...]
>
> screen->destroy(screen);
> pipe_loader_release(&devs, N);
>
A part of the code was taken from targets/gbm/pipe_loader.c, which
will be removed and replaced with calls into this library by a future
commit.
Francisco Jerez [Tue, 20 Mar 2012 21:46:11 +0000 (22:46 +0100)]
gallium/tgsi/text: Replace open-coded integer parsing with parse_int().
Francisco Jerez [Tue, 20 Mar 2012 21:39:29 +0000 (22:39 +0100)]
gallium/tgsi/text: Parse immediates of non-float data types.
Francisco Jerez [Tue, 20 Mar 2012 20:29:36 +0000 (21:29 +0100)]
gallium/tgsi: Fix tgsi_build_full_immediate() for non-float data types.
Francisco Jerez [Mon, 26 Mar 2012 15:56:29 +0000 (17:56 +0200)]
gallium/tgsi/text: Make label parsing optional for branch instructions.
Structured branch instructions like IF, ELSE, BGNLOOP, ENDLOOP no
longer require a label argument, make it optional for them.
Francisco Jerez [Thu, 8 Dec 2011 17:05:25 +0000 (18:05 +0100)]
st/mesa: Use local temporary registers.
Local makes more sense in most places because non-inline function
calls are unimplemented anyway.
Francisco Jerez [Mon, 26 Mar 2012 15:55:30 +0000 (17:55 +0200)]
gallium/tgsi/ureg: Support local temporary emission.
Francisco Jerez [Thu, 8 Dec 2011 17:00:17 +0000 (18:00 +0100)]
gallium/tgsi/ureg: Lift the restriction on releasing temporaries over UREG_MAX_TEMP.
Francisco Jerez [Fri, 25 Nov 2011 13:37:07 +0000 (14:37 +0100)]
gallium/util: Define util_strchrnul.
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Francisco Jerez [Sun, 18 Mar 2012 22:59:33 +0000 (23:59 +0100)]
gallium/compute: Drop TGSI dependency.
Add a shader cap for specifying the preferred shader representation.
Right now the only supported value is TGSI, other enum values will be
added as they are needed.
This is mainly to accommodate AMD's LLVM compiler back-end by letting
it bypass the TGSI representation for compute programs. Other drivers
will keep using the common TGSI instruction set.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Francisco Jerez [Sun, 18 Mar 2012 18:21:36 +0000 (19:21 +0100)]
gallium/tgsi: Introduce the "LOCAL" register declaration modifier.
This change will be useful to implement function parameter passing on
top of TGSI. As we don't have a proper stack, a register-based
calling convention will be used instead, which isn't necessarily a bad
thing given that GPUs often have plenty of registers to spare.
Using the same register space for local temporaries and
inter-procedural communication caused some inefficiencies, because in
some cases the register allocator would lose the freedom to merge
temporary values together into the same physical register, leading to
suboptimal register (and sometimes, as a side effect, instruction)
usage.
The LOCAL declaration modifier specifies that the value isn't intended
for parameter passing and as a result the compiler doesn't have to
give any guarantees of it being preserved across function boundaries.
Ignoring the LOCAL flag doesn't change the semantics of a valid
program in any way, because local variables are just supposed to get a
more relaxed treatment. IOW, this should be a backwards-compatible
change.
Francisco Jerez [Mon, 30 Apr 2012 18:22:23 +0000 (20:22 +0200)]
gallium/tgsi: Add support for atomic opcodes.
Francisco Jerez [Mon, 30 Apr 2012 18:21:38 +0000 (20:21 +0200)]
gallium/tgsi: Add support for barriers.
Francisco Jerez [Sun, 18 Mar 2012 17:13:29 +0000 (18:13 +0100)]
gallium/tgsi: Define system values used to query the compute grid parameters.
Francisco Jerez [Mon, 30 Apr 2012 18:20:29 +0000 (20:20 +0200)]
gallium/tgsi: Add resource write-back support.
Define a new STORE opcode with a role dual to the LOAD opcode, and add
flags to specify that a shader resource is intended for writing.
Francisco Jerez [Mon, 30 Apr 2012 17:08:55 +0000 (19:08 +0200)]
gallium/tgsi: Add support for raw resources.
Normal resource access (e.g. the LOAD TGSI opcode) is supposed to
perform a series of conversions to turn the texture data as it's found
in memory into the target data type.
In compute programs it's often the case that we only want to access
the raw bits as they're stored in some buffer object, and any kind of
channel conversion and scaling is harmful or inefficient, especially
in implementations that lack proper hardware support to take care of
it -- in those cases the conversion has to be implemented in software
and it's likely to result in a performance hit even if the pipe_buffer
and declaration data types are set up in a way that would just pass
the data through.
Add a declaration flag that marks a resource as typeless. No channel
conversion will be performed in that case, and the X coordinate of the
address vector will be interpreted in byte units instead of elements
for obvious reasons.
This is similar to D3D11's ByteAddressBuffer, and will be used to
implement OpenCL's constant arguments. The remaining four compute
memory spaces can also be understood as raw resources.
Francisco Jerez [Mon, 30 Apr 2012 16:28:36 +0000 (18:28 +0200)]
gallium/tgsi: Define the TGSI_BUFFER texture target.
This texture type was already referred to by the documentation but it
was never defined. Define it as 0 to match the pipe_texture_target
enumeration values.
Francisco Jerez [Sun, 18 Mar 2012 18:09:18 +0000 (19:09 +0100)]
gallium/tgsi: Introduce the compute processor.
Francisco Jerez [Mon, 30 Apr 2012 16:27:52 +0000 (18:27 +0200)]
gallium/tgsi: Move interpolation info from tgsi_declaration to a separate token.
Move Interpolate, Centroid and CylindricalWrap from tgsi_declaration
to a separate token -- they only make sense for FS inputs and we need
room for other flags in the top-level declaration token.
Francisco Jerez [Tue, 1 May 2012 00:47:03 +0000 (02:47 +0200)]
gallium: Add context hooks for binding shader resources.
Francisco Jerez [Tue, 1 May 2012 00:38:51 +0000 (02:38 +0200)]
gallium/tgsi: Split sampler views from shader resources.
This commit splits the current concept of resource into "sampler
views" and "shader resources":
"Sampler views" are textures or buffers that are bound to a given
shader stage and can be read from in conjunction with a sampler
object. They are analogous to OpenGL texture objects or Direct3D
SRVs.
"Shader resources" are textures or buffers that can be read and
written from a shader. There's no support for floating point
coordinates, address wrap modes or filtering, and, unlike sampler
views, shader resources are global for the whole graphics pipeline.
They are analogous to OpenGL image objects (as in
ARB_shader_image_load_store) or Direct3D UAVs.
Most hardware is likely to implement shader resources and sampler
views as separate objects, so, having the distinction at the API level
simplifies things slightly for the driver.
This patch introduces the SVIEW register file with a declaration token
and syntax analogous to the already existing RES register file. After
this change, the SAMPLE_* opcodes no longer accept a resource as
input, but rather a SVIEW object. To preserve the functionality of
reading from a sampler view with integer coordinates, the
SAMPLE_I(_MS) opcodes are introduced which are similar to LOAD(_MS)
but take a SVIEW register instead of a RES register as argument.
Francisco Jerez [Wed, 25 Apr 2012 20:15:16 +0000 (22:15 +0200)]
gallium: Basic compute interface.
Define an interface that exposes the minimal functionality required to
implement some of the popular compute APIs. This commit adds entry
points to set the grid layout and other state required to keep track
of the usual address spaces employed in compute APIs, to bind a
compute program, and execute it on the device.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Michel Dänzer [Fri, 11 May 2012 09:52:16 +0000 (11:52 +0200)]
radeonsi: Properly translate vertex format swizzle.
egltri_screen works correctly!
Tom Stellard [Thu, 10 May 2012 19:54:43 +0000 (15:54 -0400)]
radeon/llvm: Remove AMDILMCCodeEmitter.cpp
Tom Stellard [Thu, 10 May 2012 19:31:42 +0000 (15:31 -0400)]
radeon/llvm: Remove SILowerShaderInstructions.cpp
Tom Stellard [Thu, 10 May 2012 19:29:00 +0000 (15:29 -0400)]
radeonsi/llvm: Move lowering of RETURN to ConvertToISA pass
Tom Stellard [Wed, 9 May 2012 15:06:48 +0000 (11:06 -0400)]
radeon/llvm: Add some comments
Tom Stellard [Thu, 10 May 2012 16:49:41 +0000 (12:49 -0400)]
radeon/llvm: Move util functions into AMDGPU namespace
Paul Berry [Mon, 30 Apr 2012 05:05:28 +0000 (22:05 -0700)]
i965/hiz: Convert gen{6,7}_hiz.h to gen{6,7}_blorp.h
This patch renames the gen6_hiz.h and gen7_hiz.h files to correspond
to the renames of the corresponding .cpp files (see previous commit).
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Paul Berry [Mon, 30 Apr 2012 04:50:22 +0000 (21:50 -0700)]
i965/hiz: Convert gen{6,7}_hiz.c to C++
This patch converts the files gen6_hiz.c and gen7_hiz.c to C++, in
preparation for expanding the HiZ code to support arbitrary blits.
The new files are called gen6_blorp.cpp and gen7_blorp.cpp to reflect
the expanded role that this code will serve--"blorp" stands for "BLit
Or Resolve Pass".
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Paul Berry [Thu, 26 Apr 2012 16:29:19 +0000 (09:29 -0700)]
i965/hiz: Make void pointer type casts explicit
Previous to this patch, gen6_hiz.c contained two implicit type casts
from void * to a a non-void pointer type. This is allowed in C but
not in C++. This patch makes the type casts explicit, so that
gen6_hiz.c can be converted into a C++ file.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Paul Berry [Mon, 30 Apr 2012 04:46:47 +0000 (21:46 -0700)]
intel: Work around differences between C and C++ scoping rules.
In C++, if a struct is defined inside another struct, or its name is
first seen inside a struct or function, the struct is nested inside
the namespace of the struct or function it appears in. In C, all
structs are visible from toplevel.
This patch explicitly moves the decalartions of intel_batchbuffer to
toplevel, so that it does not get nested inside a namespace when
header files are included from C++.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Paul Berry [Fri, 27 Apr 2012 14:40:34 +0000 (07:40 -0700)]
intel: Add extern "C" declarations to headers
These declarations are necessary to allow C++ code to call C code
without causing unresolved symbols (which would make the driver fail
to load).
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Tom Stellard [Thu, 10 May 2012 15:52:00 +0000 (11:52 -0400)]
radeon/llvm: Auto-encode RAT_WRITE_CACHELESS_eg
Tom Stellard [Thu, 10 May 2012 15:31:52 +0000 (11:31 -0400)]
radeon/llvm: Delete all instructions that have been custom lowered
Michel Dänzer [Thu, 10 May 2012 11:54:39 +0000 (13:54 +0200)]
radeonsi: Set NONE format for unused vertex shader position export slots.
Michel Dänzer [Thu, 10 May 2012 11:54:27 +0000 (13:54 +0200)]
radeonsi: Eliminate one more magic number for texture image resources.
Michel Dänzer [Thu, 10 May 2012 11:54:27 +0000 (13:54 +0200)]
radeonsi: Fix vertex buffer resource for stride 0.
Tom Stellard [Wed, 9 May 2012 15:50:02 +0000 (11:50 -0400)]
radeon/llvm: Remove AMDGPUConstants.pm
Tom Stellard [Wed, 9 May 2012 15:44:27 +0000 (11:44 -0400)]
radeon/llvm: Don't rely on tablegen for lowering int_AMDGPU_load_const
Tom Stellard [Wed, 9 May 2012 15:43:17 +0000 (11:43 -0400)]
radeon/llvm: Make sure the LOAD_CONST def uses the isSI predicate
Brian Paul [Wed, 9 May 2012 16:31:07 +0000 (10:31 -0600)]
svga: implement CEIL opcode translation
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Christoph Bumiller [Sat, 5 May 2012 12:38:09 +0000 (14:38 +0200)]
glsl_to_tgsi: use TGSI_OPCODE_CEIL for ir_unop_ceil
The implementation using FLR was buggy, the second negation could
get lost.
Christoph Bumiller [Sat, 5 May 2012 12:36:40 +0000 (14:36 +0200)]
gallium/drivers: handle TGSI_OPCODE_CEIL
Kai Wasserbäch [Mon, 7 May 2012 15:59:35 +0000 (17:59 +0200)]
r600g: Handle TGSI_OPCODE_CEIL (v2)
v2: Enabled CEIL on Cayman too.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Dave Airlie [Mon, 6 Feb 2012 18:33:21 +0000 (18:33 +0000)]
gallivm: implement iabs/issg opcode.
Reimplemented by Olivier Galibert <galibert@pobox.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Yuanhan Liu [Wed, 2 May 2012 09:29:11 +0000 (17:29 +0800)]
i965: fix wrong cube/3D texture layout
Fix wrong cube/3D texture layout for the tailing levels whose width or
height is smaller than the align unit.
From 965 B-spec http://intellinuxgraphics.org/VOL_1_graphics_core.pdf at
page 135:
All of the LOD=0 q-planes are stacked vertically, then below that,
the LOD=1 qplanes are stacked two-wide, then the LOD=2 qplanes are
stacked four-wide below that, and so on.
Thus we should always inrease pack_x_nr, which results to the pitch of LODn
may greater than the pitch of LOD0. So we should refactor mt->total_width
when needed.
This would fix the following webgl test case on all gen4 platforms:
conformance/textures/texture-size-cube-maps.html
NOTE: This is a candidate for stable release branches.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tom Stellard [Tue, 8 May 2012 19:37:59 +0000 (15:37 -0400)]
radeon/llvm: Remove AMDILUtilityFunctions.cpp