Tilman Sauerbeck [Tue, 2 Nov 2010 21:15:15 +0000 (22:15 +0100)]
st/mesa: Reset the constant buffers before destroying the pipe context.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Brian Paul [Thu, 4 Nov 2010 16:01:28 +0000 (10:01 -0600)]
gallivm: implement execution mask for scatter stores
Brian Paul [Thu, 4 Nov 2010 16:00:58 +0000 (10:00 -0600)]
gallivm: added lp_elem_type()
Brian Paul [Thu, 4 Nov 2010 15:31:56 +0000 (09:31 -0600)]
gallivm: add pixel offsets in scatter stores
We want to do the scatter store to sequential locations in memory
for the vector of pixels we're processing in SOA format.
Brian Paul [Thu, 4 Nov 2010 15:28:06 +0000 (09:28 -0600)]
gallivm: added debug code to dump temp registers
Michal Krol [Thu, 4 Nov 2010 14:12:47 +0000 (15:12 +0100)]
graw/gdi: Fix window dimensions.
The requested window size is of the client area,
so account for surrounding borders and bars when
creating the window.
Michal Krol [Thu, 4 Nov 2010 13:33:31 +0000 (14:33 +0100)]
scons: Hook-up graw-gdi target.
Michal Krol [Thu, 4 Nov 2010 13:33:11 +0000 (14:33 +0100)]
graw/gdi: Initial commit.
Guillermo S. Romero [Wed, 3 Nov 2010 21:14:00 +0000 (22:14 +0100)]
r300g: Do not use buf param before checking for NULL.
Commit
8dfafbf0861fe3d2542332658dd5493851053c78 forgot to update r300g.
There is a buf == NULL check, but buf is used before for var init.
Tested-by: Guillermo S. Romero <gsromero@infernal-iceberg.com>
Michal Krol [Thu, 4 Nov 2010 11:20:14 +0000 (12:20 +0100)]
tgsi/build: Reduce interface clutter.
Make private those functions that are used internally only.
Michal Krol [Thu, 4 Nov 2010 10:51:10 +0000 (11:51 +0100)]
tgsi/exec: Get rid of obsolete condition codes.
Michal Krol [Thu, 4 Nov 2010 10:37:24 +0000 (11:37 +0100)]
tgsi/exec: Cleanup the remaining arithmetic instructions.
As a result remove some nasty macros.
Vinson Lee [Thu, 4 Nov 2010 01:13:14 +0000 (18:13 -0700)]
dri/nouveau: Silence uninitialized variable warning.
Fixes this GCC warning.
nouveau_vbo_t.c: In function 'nv10_vbo_render_prims':
nouveau_render_t.c:161: warning: 'max_out' may be used uninitialized in this function
nouveau_render_t.c:161: note: 'max_out' was declared here
Brian Paul [Wed, 3 Nov 2010 23:32:21 +0000 (17:32 -0600)]
gallivm: add some LLVM var labels
Brian Paul [Wed, 3 Nov 2010 23:29:28 +0000 (17:29 -0600)]
gallivm: implement scatter stores into temp register file
Something is not quite right, however. The piglit tests mentioned in
fd.o bug 31226 still don't pass.
Kenneth Graunke [Wed, 3 Nov 2010 02:53:12 +0000 (19:53 -0700)]
ir_reader: Fix some potential NULL pointer dereferences.
Found by inspection.
Kenneth Graunke [Wed, 3 Nov 2010 02:15:55 +0000 (19:15 -0700)]
ir_reader: Remove useless error check.
It's already been determined that length == 3, so clearly swiz->next is
a valid S-Expression.
Kenneth Graunke [Sun, 31 Oct 2010 05:29:07 +0000 (22:29 -0700)]
ir_reader: Return a specific ir_dereference variant.
There's really no reason to return the base class when we have more
specific information about what type it is.
Kenneth Graunke [Sun, 31 Oct 2010 04:45:34 +0000 (21:45 -0700)]
glsl: Don't print a useless space at the end of an S-Expression list.
We really only want to print spaces -between- elements, not after each
element. This cleans up error messages from IR reader, making them
(mildly) easier to read.
Kenneth Graunke [Wed, 3 Nov 2010 02:55:36 +0000 (19:55 -0700)]
Refresh autogenerated file builtin_function.cpp.
Kenneth Graunke [Sun, 31 Oct 2010 04:59:52 +0000 (21:59 -0700)]
glsl/builtins: Clean up some ugly autogenerated code in atan.
In particular, calling the abs function is silly, since there's already
an expression opcode for that. Also, assigning to temporaries then
assigning those to the final location is rather redundant.
Kenneth Graunke [Sun, 31 Oct 2010 04:51:01 +0000 (21:51 -0700)]
glsl/builtins: Rename 'x' to 'y_over_x' in atan(float) implementation.
For consistency with the vec2/vec3/vec4 variants.
José Fonseca [Wed, 3 Nov 2010 20:22:28 +0000 (20:22 +0000)]
r600g: Swap the util_blitter_destroy call order.
Trivial change that avoids a segmentation fault when the blitter state
happens to be bound when the context is destroyed.
The free calls should probably removed altogether in the future -- the
responsibility to destroy the state atoms lies with whoever created it,
and the safest thing for the pipe driver is to not touch any bound state
in its destructor.
Brian Paul [Sat, 30 Oct 2010 16:36:53 +0000 (10:36 -0600)]
mesa: code to unpack RGBA as uints
José Fonseca [Wed, 3 Nov 2010 15:41:06 +0000 (15:41 +0000)]
xorg/vmwgfx: Link libkms when available.
José Fonseca [Wed, 3 Nov 2010 15:21:51 +0000 (15:21 +0000)]
st/xorg: Detect libkms with scons too.
José Fonseca [Wed, 3 Nov 2010 15:14:29 +0000 (15:14 +0000)]
st/xorg: Add missing \n to error message.
José Fonseca [Wed, 3 Nov 2010 14:01:44 +0000 (14:01 +0000)]
xorg/vmwgfx: Add missing source file to SConscript.
Eric Anholt [Wed, 3 Nov 2010 03:43:48 +0000 (20:43 -0700)]
intel: Remove leftover dri1 locking fields in the context.
Eric Anholt [Wed, 3 Nov 2010 03:36:47 +0000 (20:36 -0700)]
intel: Remove duplicated teximage miptree to object miptree promotion.
intel_finalize_mipmap_tree() does this optimization too, just more
aggressively.
Eric Anholt [Wed, 3 Nov 2010 03:30:41 +0000 (20:30 -0700)]
intel: Avoid taking logbase2 of several things that we max.
logbase2(max(width, height, depth)) ==
max(logbase2(width), logbase2(height), logbase2(depth)), but in 60
bytes less code.
Eric Anholt [Wed, 3 Nov 2010 03:24:35 +0000 (20:24 -0700)]
i965: Remove dead intel_structs.h file.
Eric Anholt [Wed, 3 Nov 2010 03:15:45 +0000 (20:15 -0700)]
intel: Remove the magic unaligned memcpy code.
In testing on Ironlake, the histogram of clocks/pixel results for the
system memcpy and magic unaligned memcpy show no noticeable difference
(and no statistically significant difference with the 5510 samples
taken, though the stddev is large due to what looks like the cache
effects from the different texture sizes used).
Eric Anholt [Wed, 3 Nov 2010 02:55:07 +0000 (19:55 -0700)]
intel: Annotate debug printout checks with unlikely().
This provides the optimizer with hints about code hotness, which we're
quite certain about for debug printouts (or, rather, while we
developers often hit the checks for debug printouts, we don't care
about performance while doing so).
Brian Paul [Wed, 3 Nov 2010 13:04:42 +0000 (07:04 -0600)]
egl/gdi: fix typo: xsurf->gsurf
Keith Whitwell [Wed, 3 Nov 2010 11:15:43 +0000 (11:15 +0000)]
evergreeng: set hardware pixelcenters according to gl_rasterization_rules
Keith Whitwell [Mon, 1 Nov 2010 14:19:18 +0000 (14:19 +0000)]
evergreeng: respect linewidth state, use integer widths only
Discard fractional bits from linewidth. This matches the nvidia
closed drivers, my reading of the OpenGL SI and current llvmpipe
behaviour.
It looks a lot nicer & avoids ugliness where lines alternate between n
and n+1 pixels in width along their length.
Also fix up r600g to match.
Keith Whitwell [Wed, 3 Nov 2010 10:31:55 +0000 (10:31 +0000)]
r600g: don't call debug_get_bool_option for tiling more than once
Keith Whitwell [Wed, 3 Nov 2010 10:24:28 +0000 (10:24 +0000)]
evergreeng: protect against null constant buffers
Should do better than this and actually unbind the buffer, but haven't
yet gotten it to work.
Chia-I Wu [Sun, 10 Oct 2010 12:47:02 +0000 (20:47 +0800)]
st/egl: Use native_display_buffer for EGL_MESA_drm_image.
native_display_buffer is just a wrapper to resource_{from,get}_handle
for drm backend.
Chia-I Wu [Sun, 10 Oct 2010 12:15:06 +0000 (20:15 +0800)]
st/egl: Add native_display_buffer interface.
The interface is a wrapper to pipe_screen::resource_from_handle and
pipe_screen::resource_get_handle. A winsys handle is
platform-dependent.
Chia-I Wu [Mon, 11 Oct 2010 08:29:43 +0000 (16:29 +0800)]
st/egl: Add extern "C" wrapper to native.h.
This allows a backend to be written in C++.
Keith Whitwell [Sun, 17 Oct 2010 18:45:49 +0000 (11:45 -0700)]
r600g: set hardware pixel centers according to gl_rasterization_rules
These were previously being left in the default (D3D) mode. This mean
that triangles were drawn slightly incorrectly, but also because this
state is relied on by the u_blitter code, all blits were half a pixel
off.
Keith Whitwell [Tue, 2 Nov 2010 15:49:44 +0000 (15:49 +0000)]
r600g: remove unused flink, domain fields from r600_resource
These were being set but not used anywhere.
Keith Whitwell [Tue, 2 Nov 2010 17:51:34 +0000 (17:51 +0000)]
r600g: use a buffer in GTT as intermediate on texture up and downloads
Generalize the existing tiled_buffer path in texture transfers for use
in some non-tiled up and downloads.
Use a staging buffer, which the winsys will restrict to GTT memory.
GTT buffers have the major advantage when they are mapped, they are
cachable, which is a very nice property for downloads, usually the CPU
will want to do look at the data it downloaded.
Keith Whitwell [Tue, 2 Nov 2010 17:47:06 +0000 (17:47 +0000)]
r600g: propogate resource usage flags to winsys, use to choose bo domains
This opens the question of what interface the winsys layer should
really have for talking about these concepts.
For now I'm using the existing gallium resource usage concept, but
there is no reason not use terms closer to what the hardware
understands - eg. the domains themselves.
Keith Whitwell [Fri, 15 Oct 2010 13:44:30 +0000 (14:44 +0100)]
r600g: propagate usage flags in texture transfers
Chia-I Wu [Wed, 3 Nov 2010 08:49:47 +0000 (16:49 +0800)]
st/egl: Add support for EGL_MATCH_NATIVE_PIXMAP.
Added for completeness. It makes sense to have such mechanism, but I am
not aware of any user of that..
Chia-I Wu [Wed, 3 Nov 2010 08:20:26 +0000 (16:20 +0800)]
st/egl: Add support for swap interval and swap behavior.
The value of EGL_MAX_SWAP_INTERVAL and whether
EGL_SWAP_BEHAVIOR_PRESERVED_BIT is set will depend on the native
backend used.
Chia-I Wu [Wed, 3 Nov 2010 08:07:23 +0000 (16:07 +0800)]
st/egl: Remove flush_frontbuffer and swap_buffers.
They are deprecated by native_surface::present and there is no user of
them.
Chia-I Wu [Wed, 3 Nov 2010 08:00:47 +0000 (16:00 +0800)]
d3d1x: Use native_surface::present.
Replace native_surface::flush_frontbuffer and
native_surface::swap_buffers calls by native_surface::present calls.
Chia-I Wu [Wed, 3 Nov 2010 07:57:06 +0000 (15:57 +0800)]
st/egl: Use native_surface::present callback.
Replace native_surface::flush_frontbuffer and
native_surface::swap_buffers calls by native_surface::present calls.
Chia-I Wu [Wed, 3 Nov 2010 07:22:36 +0000 (15:22 +0800)]
st/egl: Add native_surface::present callback.
The callback presents the given attachment to the native engine. It
allows the swap behavior and interval to be controlled. It will replace
native_surface::flush_frontbuffer and native_surface::swap_buffers
shortly.
Chia-I Wu [Tue, 2 Nov 2010 17:11:54 +0000 (01:11 +0800)]
egl: Set up the pthread key even TLS is used.
We have to rely on the pthread key destructor to free the current thread
info when a thread exits.
Vinson Lee [Wed, 3 Nov 2010 00:13:44 +0000 (17:13 -0700)]
st/vega: Remove unnecessary headers.
Brian Paul [Tue, 2 Nov 2010 23:40:58 +0000 (17:40 -0600)]
mesa: silence new warnings in texobj.c
Silences warning such as:
main/texobj.c:442:40: warning: ISO C99 requires rest arguments to be used
main/texobj.c:498:58: warning: ISO C99 requires rest arguments to be used
Vinson Lee [Tue, 2 Nov 2010 23:23:30 +0000 (16:23 -0700)]
savage: Remove unnecessary header.
Eric Anholt [Mon, 20 Sep 2010 21:10:20 +0000 (14:10 -0700)]
intel: For batch, use GTT mapping instead of writing to a malloc and copying.
No measurable performance difference on cairo-perf-trace, but
simplifies the code and should have cache benefit in general.
Eric Anholt [Tue, 2 Nov 2010 20:40:39 +0000 (13:40 -0700)]
mesa: Don't compute an unused texture completeness debug string.
This showed up at about 1% on cairo-gl firefox-talos-gfx, where
glClear() is called while a texture is incomplete.
Tilman Sauerbeck [Sun, 31 Oct 2010 14:55:51 +0000 (15:55 +0100)]
st/mesa: Reset the index buffer before destroying the pipe context.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Tilman Sauerbeck [Sun, 31 Oct 2010 14:51:55 +0000 (15:51 +0100)]
r600g: Destroy the winsys in r600_destroy_screen().
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Tilman Sauerbeck [Sun, 31 Oct 2010 11:16:25 +0000 (12:16 +0100)]
r600g: Fixed two memory leaks in winsys.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Tilman Sauerbeck [Sun, 31 Oct 2010 11:16:03 +0000 (12:16 +0100)]
r600g: Delete custom_dsa_flush on shutdown.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Tilman Sauerbeck [Sat, 30 Oct 2010 15:32:24 +0000 (17:32 +0200)]
r600g: We don't support PIPE_CAP_PRIMITIVE_RESTART.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Tilman Sauerbeck [Fri, 29 Oct 2010 17:30:57 +0000 (19:30 +0200)]
r600g: Made radeon_bo::map_count signed.
That way assert(map_count >= 0) can actually fail when we screwed up.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Tilman Sauerbeck [Fri, 29 Oct 2010 19:34:26 +0000 (21:34 +0200)]
r600g: Fixed unmap condition in radeon_bo_pb_destroy().
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Tilman Sauerbeck [Fri, 29 Oct 2010 17:29:54 +0000 (19:29 +0200)]
r600g: Made radeon_bo_pb_map_internal() actually call radeon_bo_map().
This ensures that we increase bo->map_count when radeon_bo_map_internal()
returns successfully, which in turn makes sure we don't decrement
bo->map_count below zero later.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Tilman Sauerbeck [Thu, 28 Oct 2010 19:27:37 +0000 (21:27 +0200)]
r600g: Removed unused 'ptr' argument from radeon_bo().
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Jakob Bornecrantz [Tue, 2 Nov 2010 18:17:21 +0000 (18:17 +0000)]
graw: Tidy graw xlib scons file a bit
Brian Paul [Tue, 2 Nov 2010 17:53:14 +0000 (11:53 -0600)]
llvmpipe: add a cast
Brian Paul [Tue, 2 Nov 2010 17:49:10 +0000 (11:49 -0600)]
llvmpipe: assign context's frag shader pointer before using it
The call to draw_bind_fragment_shader() was using the old fragment
shader. This bug would have really only effected the draw module's
use of the fragment shader in the wide point stage.
Chad Versace [Mon, 1 Nov 2010 21:23:53 +0000 (14:23 -0700)]
mesa: Fix C++ includes in sampler.cpp
Some C++ header files were included in an extern "C" block. When building with
Clang, this caused the build to fail due to namespace errors. (GCC did not
report any errors.)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Keith Whitwell [Tue, 2 Nov 2010 16:29:10 +0000 (16:29 +0000)]
st/mesa: unbind constant buffer when not in use
Important as more constant buffers per shader start to get used.
Fix up r600 (tested) and nv50 (untested) to cope with this. Drivers
previously didn't see unbinds of constant buffers often or ever, so
this isn't always dealt with cleanly.
For r600 just return and keep the reference. Will try to do better in
a followup change.
Keith Whitwell [Tue, 2 Nov 2010 12:05:46 +0000 (12:05 +0000)]
llvmpipe: guard against NULL task->query pointer
This doesn't seem like it should be possible, but some test suites
manage to hit this case. Avoid crashing release builds under those
circumstances.
Keith Whitwell [Tue, 2 Nov 2010 14:20:20 +0000 (14:20 +0000)]
llvmpipe: avoid generating tri_16 for tris which extend past tile bounds
Don't trim triangle bounding box to scissor/draw-region until after
the logic for emitting tri_16. Don't generate tri_16 commands for
triangles with untrimmed bounding boxes outside the current tile.
This is important as the tri-16 itself can extend past tile bounds and
we don't want to add code to it to check against tile bounds (slow) or
restrict it to locations within a tile (pessimistic).
Brian Paul [Tue, 2 Nov 2010 15:56:04 +0000 (09:56 -0600)]
mesa: fix aux/accum comment and error message mixups
Brian Paul [Tue, 2 Nov 2010 15:40:55 +0000 (09:40 -0600)]
mesa: remove always-false conditional in check_compatible()
The two gl_config pointers can never be equal.
Brian Paul [Tue, 2 Nov 2010 15:30:47 +0000 (09:30 -0600)]
dri/util: add a bunch of comments
Brian Paul [Tue, 2 Nov 2010 15:05:16 +0000 (09:05 -0600)]
mesa: move the gl_config struct declaration
It was in the middle of the lighting-related structures before.
Also add some info about field sizes in this structure.
Brian Paul [Tue, 2 Nov 2010 14:22:40 +0000 (08:22 -0600)]
mesa: use GLubyte for edge flag arrays
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=31310
José Fonseca [Tue, 2 Nov 2010 14:20:12 +0000 (14:20 +0000)]
scons: Propagate installation targets.
Fixes libgl-xlib target.
José Fonseca [Tue, 2 Nov 2010 13:49:35 +0000 (13:49 +0000)]
scons: i915 can't build on MSVC either.
I thought I had singled it out before, but apparently not.
José Fonseca [Tue, 2 Nov 2010 12:35:23 +0000 (12:35 +0000)]
scons: Add aliases for several pipe drivers.
José Fonseca [Tue, 2 Nov 2010 12:34:52 +0000 (12:34 +0000)]
r600g: List recently added files in SConscript.
Zhenyu Wang [Tue, 2 Nov 2010 03:08:58 +0000 (11:08 +0800)]
i965: refresh wm push constant also for BRW_NEW_FRAMENT_PROGRAM on gen6
Fix compiz crash.
https://bugs.freedesktop.org/show_bug.cgi?id=31124
Chia-I Wu [Tue, 26 Oct 2010 03:31:37 +0000 (11:31 +0800)]
mesa: Allow contexts of different APIs to coexist.
This effectively redoes
1741ddb747ca0be284315adb4b6fe67ddf292d03 in a
way that allows contexts of different APIs to coexist.
First, the changes to the remap table are reverted. The remap table
(driDispatchRemapTable) is always initialized in the same way regardless
of the context API.
es_generator.py is updated to use a local remap table, whose sole
purpose is to help initialize its dispatch table. The local remap table
and the global one are always different, as they use different
glapidispatch.h. But the dispatch tables initialized by both remap
tables are always compatible with glapi (libGL.so).
Finally, the semantics of one_time_init are changed to per-api one-time
initialization.
Chia-I Wu [Tue, 26 Oct 2010 08:16:14 +0000 (16:16 +0800)]
mesa: Select FEATURE_remap_table when multiple APIs are enabled.
Core mesa should query glapi for the positions of the functions in
_glapi_table when multiple APIs are supported. It does not know which
glapitable.h glapi used.
Tom Stellard [Tue, 2 Nov 2010 05:06:20 +0000 (22:06 -0700)]
r300/compiler: Don't track readers into an IF block.
This makes rc_get_readers_normal() more conservative than it needs to be,
but it fixes some incorrect behavior in the optimization passes.
Chia-I Wu [Mon, 1 Nov 2010 17:23:13 +0000 (01:23 +0800)]
egl: Rework _eglGetSearchPath.
So that the directory part of EGL_DRIVER, if exists, is prepended to the
search path. This commit also adds a sanity check to _eglLog.
José Fonseca [Mon, 1 Nov 2010 15:27:34 +0000 (15:27 +0000)]
scons: Disable python state tracker when swig is not present.
José Fonseca [Mon, 1 Nov 2010 14:37:18 +0000 (14:37 +0000)]
scons: Restore x11 tool behavior for backwards compatability.
José Fonseca [Mon, 1 Nov 2010 14:24:08 +0000 (14:24 +0000)]
scons: Some pipe drivers are not portable for MSVC
José Fonseca [Mon, 1 Nov 2010 13:56:16 +0000 (13:56 +0000)]
scons: Fix MinGW cross-compilation.
José Fonseca [Mon, 1 Nov 2010 13:30:22 +0000 (13:30 +0000)]
scons: Revamp how to specify targets to build.
Use scons target and dependency system instead of ad-hoc options.
Now is simply a matter of naming what to build. For example:
scons libgl-xlib
scons libgl-gdi
scons graw-progs
scons llvmpipe
and so on. And there is also the possibility of scepcified subdirs, e.g.
scons src/gallium/drivers
If nothing is specified then everything will be build.
There might be some rough corners over the next days. Please bare with me.
Francisco Jerez [Sun, 31 Oct 2010 21:05:16 +0000 (22:05 +0100)]
dri/nouveau: Re-emit the BO state when coming back from a software fallback.
Francisco Jerez [Sun, 31 Oct 2010 21:07:26 +0000 (22:07 +0100)]
dri/nouveau: Validate the framebuffer state on read buffer changes.
Francisco Jerez [Sun, 31 Oct 2010 18:00:31 +0000 (19:00 +0100)]
dri/nouveau: Fix type promotion issue on 32bit platforms.
Fixes some VTX protection errors introduced by
e89af209261.
Benjamin Franzke [Sun, 31 Oct 2010 15:01:52 +0000 (16:01 +0100)]
st/egl image: multiply drm buf-stride with blocksize
[olv: formatted for 80-column wrapping]
Chia-I Wu [Sun, 31 Oct 2010 13:14:20 +0000 (21:14 +0800)]
targets/egl: Fix a warning with --disable-opengl build.
API_DEFINES is the defines for libmesagallium.a. Append it to
egl_CPPFLAGS only when st_GL.so, which uses libmesagallium.a, is built.
Chia-I Wu [Sun, 31 Oct 2010 13:01:54 +0000 (21:01 +0800)]
autoconf: Tidy configure output for EGL.
Prefix EGL driver names by "egl_". Make it clear that EGL_CLIENT_APIS
is only used by egl_gallium.