Marek Olšák [Thu, 8 Mar 2012 10:14:53 +0000 (11:14 +0100)]
Revert "r600g: rework rasterizer discard for evergreen"
I will use SX_MISC instead.
This reverts commit
734792e83fdc526623d8fe0a60479648c936bd53.
Conflicts:
src/gallium/drivers/r600/evergreen_hw_context.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_pipe.h
Zack Rusin [Sat, 3 Mar 2012 01:13:38 +0000 (20:13 -0500)]
svga: fix the rasterizer state resets
draw module calls back into the driver and sets certain parts
of the state to whatever it needs, unfortunately unless you
get the ordering of calls to draw just right you'll end up
reseting your own driver state. That's what was happening to us
draw module would under certain conditions reset our own driver
state.
Reviewed-by: Brian Paul <brianp@vmware.com>
Johannes Obermayr [Sat, 3 Mar 2012 17:11:22 +0000 (18:11 +0100)]
glx: Also put a symlink from libGL.so in lib/ for now.
This fixes the libGLU.so.* build when a system libGL.so is not present
since it is relying on the lib/ to build against until it gets
converted to automake.
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Benjamin Franzke [Wed, 7 Mar 2012 16:21:20 +0000 (17:21 +0100)]
gbm_dri: Fix DRIimage lookup callback
That is by making the dri extension variables static in gbm_dri.c.
The image_lookup_extension is provided by egl_dri2 when using x11 or wayland
platforms, when using the drm platform, gbm_dri has a wrapper for it.
Both use the same variables name image_lookup_extension.
Since -fvisibility=hidden was (probably by mistake) removed when converting to
automake, the "image_lookup_extension" symbol from egl_dri2.c became exported
in libEGL.so, so "image_lookup_extension" from gbm_dri.c was ignored.
This resulted in calling incorrect callbacks.
We cant make the image_lookup_extension static in egl_dri2.c right now,
since its used across multiple files.
Bugzilla: https://bugs.freedesktop.org/attachment.cgi?id=58099
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Brian Paul [Wed, 7 Mar 2012 15:13:38 +0000 (08:13 -0700)]
mesa: handle array textures in strip_texture_border()
If the texture is a 1D array, don't remove the border pixel from the
height. Similarly for 2D array textures and the depth direction.
Simplify the function by assuming the border is always one pixel.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Brian Paul [Mon, 5 Mar 2012 20:02:59 +0000 (13:02 -0700)]
docs: add more MinGW prerequisite tips
Provided by Charles Huber on the mesa-users list.
Marek Olšák [Wed, 7 Mar 2012 12:48:38 +0000 (13:48 +0100)]
r600g: only emit SX_SURFACE_SYNC on r700 if there's CS checker support
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47039
Yuanhan Liu [Mon, 27 Feb 2012 07:46:32 +0000 (15:46 +0800)]
i965: handle gl_PointCoord for Gen4 and Gen5 platforms
This patch add the support of gl_PointCoord gl builtin variable for
platform gen4 and gen5(ILK).
Unlike gen6+, we don't have a hardware support of gl_PointCoord, means
hardware will not calculate the interpolation coefficient for you.
Instead, you should handle it yourself in sf shader stage.
But badly, gl_PointCoord is a FS instead of VS builtin variable, thus
it's not included in c.vue_map generated in VS stage. Thus the current
code doesn't aware of this attribute. And to handle it correctly, we
need add it to c.vue_map manually to let SF shader generate the needed
interpolation coefficient for FS shader. SF stage has it's own copy of
vue_map, thus I think it's safe to do it manually.
Since handling gl_PointCoord for gen4 and gen5 platforms is somehow a
little special, I added a lot of comments and hope I didn't overdo it ;)
v2: add a /* _NEW_BUFFERS */ comment to note the state flag dependency
and also add the _NEW_BUFFERS dirty mask (Eric).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45975
Piglit: glsl-fs-pointcoord and fbo-gl_pointcoord
NOTE: This is a candidate for stable release branches.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Yuanhan Liu [Tue, 6 Mar 2012 06:40:32 +0000 (14:40 +0800)]
i915: move the FALLBACK_DRAW_OFFSET check outside the drawing rect check
We have to do fallback when the 'Clipped Drawing Rectangle X/Y Max'
exceed the hardware's limit no matter the drawing rectangle offset
changed or not.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46665
NOTE: This is a candidate for stable release branches.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
nobled [Sun, 4 Mar 2012 20:20:31 +0000 (15:20 -0500)]
dri/nouveau: don't use nested functions
It's a GNU extension that isn't supported by clang right now:
http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Nested-Functions.html
http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc
With this, clang now compiles the nouveau classic driver.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44061
(Types changed from e.g. 'unsigned char' to 'GLubyte' so that the types can
be concatenated to form a unique function name without any whitespace
interfering.)
[ Francisco Jerez: give meaningful names to the dispatch functions. ]
Vinson Lee [Tue, 6 Mar 2012 06:00:40 +0000 (22:00 -0800)]
gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1.
llvm-3.1svn r152043 changes createMCInstPrinter to take an additional
MCRegisterInfo argument.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Sat, 3 Mar 2012 17:35:43 +0000 (17:35 +0000)]
draw/llvm: add clip distance support
This add clipdistance support like the non-llvm draw paths,
if we have a clip distance we compare with it instead of doing
the dot4.
We also have to put the have_clipvertex bit into the emitted
vertex header.
Fixes vs-clip-distance-all-planes-enabled, vs-clip-distance-const-reject,
vs-clip-distance-enables, vs-clip-distance-implicitly-sized,
vs-clip-distance-in-param, vs-clip-distance-uint-index.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Sat, 3 Mar 2012 17:07:07 +0000 (17:07 +0000)]
draw/llvm: fix storing of clipvertex and positions into pre_clip_pos (v2)
This fixes the rest of the piglit clipvertex tests.
v2: fixup comments.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Sat, 3 Mar 2012 16:58:47 +0000 (16:58 +0000)]
draw/llvm: fix clipvertex setting up clipmask. (v2)
We incorrectly setup clipmask for gl_ClipVertex, this fixes the clipmask
setup.
v2: fix comment
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
fix comment
Dave Airlie [Sun, 4 Mar 2012 13:55:43 +0000 (13:55 +0000)]
gallium: add llvm-related TODOs. (v2)
This is just a simple text file containing a list of goals for gallivm/llvmpipe
and some info on what is required to get there along with some info on who
is looking at things.
v2: add EXT_texture_array.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Anuj Phogat [Fri, 2 Mar 2012 20:00:51 +0000 (12:00 -0800)]
mesa: Fix valid texture target test in _mesa_GetTexLevelParameteriv()
_mesa_max_texture_levels() is also used to test valid texture target
in _mesa_GetTexLevelParameteriv(). GL_TEXTURE_CUBE_MAP is not allowed
as texture target in glGetTexLevelParameter(). So, this should throw
GL_INVALID_ENUM error.
Few other functions which use _mesa_max_texture_levels() like
getcompressedteximage_error_check() and getteximage_error_check()
also don't accept GL_TEXTURE_CUBE_MAP.
Above fix makes piglit fbo-cubemap test to fail. This is because of
incorrect texture target passed to _mesa_max_texture_levels() in
framebuffer_texture(). Fixing that as well
Note: This is a candidate for the stable branches
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Jon TURNEY [Sun, 4 Mar 2012 16:17:51 +0000 (16:17 +0000)]
egl: Use -no-undefined libtool flag
"Use -no-undefined to assure libtool that the library has no
unresolved symbols at link time, so that libtool will build a shared
library on platforms require that all symbols are resolved when the
library is linked."
If I had a dollar for every time I wrote this patch, I'd have about
$10 :-)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Daniel Vetter [Fri, 2 Mar 2012 20:38:44 +0000 (21:38 +0100)]
i965: fixup W-tile offset computation to take swizzling into account
There's even a comment in the code containing the right swizzling
computations!
Previously this has not been noticed because we need to manually
enabled swizzling on snb/ivb (kernel 3.4 will do that) and we
don't use the separate stencil on ilk (where the bios enables
swizzling). This fixes
piglit ./bin/fbo-stencil readpixels GL_DEPTH32F_STENCIL8 -auto
on recent drm-intel-next kernels.
Also remove the comment about ivb, it's stale now.
Swizzling detection is done by allocating a temporary x-tiled
buffer object. Unfortunately kernels before v3.2 lie on snb/ivb
because they claim that swizzling is enable, but it isn't. The
kernel commit that fixes this for backport to pre-v3.2 is
commit
acc83eb5a1e0ae7dbbf89ca2a1a943ade224bb84
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Mon Sep 12 20:49:16 2011 +0200
drm/i915: fix swizzling on gen6+
But if the kernel doesn't lie, this now works on swizzling and
not swizzling machines.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Benjamin Franzke [Wed, 29 Feb 2012 15:36:22 +0000 (16:36 +0100)]
meta: Fix compilation without FEATURE_EXT_transform_feedback
That is when building with --disable-opengl.
Fix for commit
cb045880b113b0042d8dfb7e4cdf76e6cc76c1d1.
CC: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Benjamin Franzke [Wed, 29 Feb 2012 15:36:21 +0000 (16:36 +0100)]
meta: Fix compilation without FEATURE_feedback
That is when building with --disable-opengl.
Fix for commit
c5f4024a793f1209b1693aed9a46be9374ba4741.
CC: Chad Versace <chad@chad-versace.us>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Benjamin Franzke [Mon, 5 Mar 2012 19:28:42 +0000 (20:28 +0100)]
wayland: Use new wl_display_disconnect
This replaces the previously used wl_display_destroy.
wl_display_destroy was povided by wayland-client.so and
wayland-server.so, to resolve that conflict its renamed client-side.
Roland Scheidegger [Mon, 5 Mar 2012 18:09:56 +0000 (19:09 +0100)]
gallivm: fix floating type in lp_build_mod helper
untested, but cannot have worked before.
Christian König [Thu, 1 Mar 2012 22:03:09 +0000 (23:03 +0100)]
st/vdpau: make the interface thread save
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Thu, 1 Mar 2012 11:42:20 +0000 (12:42 +0100)]
st/vdpau: implement support for high-precision output timing
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Wed, 29 Feb 2012 15:37:37 +0000 (16:37 +0100)]
st/vdpau: implement support for extra mixer layers
Signed-off-by: Christian König <deathsimple@vodafone.de>
Marek Olšák [Mon, 5 Mar 2012 15:20:05 +0000 (16:20 +0100)]
r600g: replace atom_ prefix with _state and _cmd suffixes
Marek Olšák [Mon, 5 Mar 2012 14:17:00 +0000 (15:17 +0100)]
r600g: cleanup includes
Marek Olšák [Mon, 5 Mar 2012 14:30:39 +0000 (15:30 +0100)]
winsys/radeon: cleanup includes
Marek Olšák [Mon, 5 Mar 2012 14:20:44 +0000 (15:20 +0100)]
r600g: move r600_context_bo_reloc to r600_pipe.h
so that we don't have to include r600_hw_context_priv.h outside of
the *hw_context* files.
Marek Olšák [Mon, 5 Mar 2012 14:17:42 +0000 (15:17 +0100)]
r600g: remove unused function r600_context_reg_bo
Marek Olšák [Mon, 5 Mar 2012 14:14:40 +0000 (15:14 +0100)]
r600g: remove unused definitions
Marek Olšák [Mon, 5 Mar 2012 13:13:19 +0000 (14:13 +0100)]
r600g: don't enable tiling for STAGING and STREAM usage cases
Reviewed by: Christian König <christian.koenig@amd.com>
Marek Olšák [Sun, 26 Feb 2012 17:04:36 +0000 (18:04 +0100)]
winsys/radeon: add usage parameter to cs_is_buffer_referenced
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Mon, 27 Feb 2012 13:34:52 +0000 (14:34 +0100)]
r600g: initialize DB_DEPTH_CONTROL at beginning of CS
Otherwise streamout with rasterizer discard will make the kernel upset
if the state tracker doesn't set a depth-stencil-alpha state.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Mon, 27 Feb 2012 12:56:31 +0000 (13:56 +0100)]
r600g: initialize VS_GS_OUT_PRIM_TYPE
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Mon, 27 Feb 2012 12:55:27 +0000 (13:55 +0100)]
r600g: initialize SX_SURFACE_SYNC
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Fri, 24 Feb 2012 01:08:32 +0000 (02:08 +0100)]
r600g: if pixel shader is NULL, bind a dummy one
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Wed, 29 Feb 2012 12:09:51 +0000 (13:09 +0100)]
r600g: add support for missing colorbuffer formats
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Tue, 28 Feb 2012 13:35:51 +0000 (14:35 +0100)]
r600g: remove support for SCALED colorbuffer formats
Unused by the current stack and APIs, therefore untestable.
It was used to facilitate the transition to integers.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Fri, 24 Feb 2012 16:05:21 +0000 (17:05 +0100)]
r600g: permit blitting between textures with STREAM and STAGING usage
Eventually I'd like to make every format blittable, so that the function
can go away.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Sun, 26 Feb 2012 13:47:22 +0000 (14:47 +0100)]
r600g: fix and improve rasterizer discard for r600-r700
For polygons, we have been using face culling with success, but that doesn't
work for points and lines.
Setting the point size and line width to 0 fixes it.
Also improve it even more by setting SCREEN_SCISSOR to a zero area.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Fri, 24 Feb 2012 20:26:37 +0000 (21:26 +0100)]
r600g: rework rasterizer discard for evergreen
Implement it right using STRMOUT_CONFIG.RAST_STREAM. This fixes rasterizer
discard with points and lines.
This also adds another derived state. It's a combination of rasterizer discard
and streamout enable.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Sun, 26 Feb 2012 13:05:35 +0000 (14:05 +0100)]
r600g: make some scissor regs invariant on r600-r700
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Sat, 25 Feb 2012 01:49:13 +0000 (02:49 +0100)]
r600g: make some scissor regs invariant on evergreen
We only need one scissor for the framebuffer.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Sun, 26 Feb 2012 12:17:53 +0000 (13:17 +0100)]
r600g: rework scissor for r600-r700
We must use VPORT_SCISSOR, because that's the only one we can use for multiple
scissor rectangles in ARB_viewport_array.
R700 can use the VPORT_SCISSOR_ENABLE bit, but R600 doesn't have that and must
emit a 8192x8192 rectangle if scissor is disabled.
This commit also cleanups magic numbers in create_rs_state.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Fri, 24 Feb 2012 22:35:05 +0000 (23:35 +0100)]
r600g: rework scissor for evergreen
VPORT_SCISSOR is the OpenGL scissor. How do I know? Because there are
16 of them just like GL4.1 has multiple scissor rectangles.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Fri, 24 Feb 2012 15:36:05 +0000 (16:36 +0100)]
r600g: remove obsolete todo comments
Also use XXX in the other ones, because it's the most used word for that
purpose in Mesa.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Thu, 23 Feb 2012 22:32:01 +0000 (23:32 +0100)]
r600g: correctly handle queries which don't need begin_query
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Thu, 23 Feb 2012 22:22:35 +0000 (23:22 +0100)]
r600g: don't suspend timer queries for u_blitter
Timer queries should be able to measure the time spent in u_blitter as well.
Queries are split into two groups: the timer ones and the others (streamout,
occlusion), because we should only suspend non-timer queries for u_blitter,
and later if the non-timer queries are suspended, the context flush should
only suspend and resume the timer queries.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Thu, 23 Feb 2012 21:45:45 +0000 (22:45 +0100)]
r600g: release query buffers in destroy_query
This fixes a memory leak introduced with the rework.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Thu, 23 Feb 2012 21:38:41 +0000 (22:38 +0100)]
r600g: move all query code into r600_query.c
And rename or inline functions where appropriate.
There is no reason to keep this stuff in r600_hw_context.c.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Marek Olšák [Mon, 5 Mar 2012 12:45:00 +0000 (13:45 +0100)]
Revert "gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY"
This reverts commit
0950086376b1c8b7fb89eda81ed7f2f06dee58bc.
It was decided to refactor the transfer API instead of adding workarounds
to address the performance issues.
Yuanhan Liu [Thu, 23 Feb 2012 06:19:19 +0000 (14:19 +0800)]
i915: fix wrong rendering of gl_PointSize on Pineview
The current code would ignore the point size specified by gl_PointSize
builtin variable in vertex shader on Pineview. This patch servers as
fixing that.
This patch fixes the following issues on Pineview:
webglc: https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/rendering/point-size.html
piglit: glsl-vs-point-size
NOTE: This is a candidate for stable release branches.
v2: pick Eric's nice tip for fixing this issue in hardware rendering.
v3: the last arg of EMIT_ATTR specify the size in _byte_. (Eric)
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Yuanhan Liu [Thu, 23 Feb 2012 06:19:18 +0000 (14:19 +0800)]
tnl: let _TNL_ATTRIB_POINTSIZE do not depend on ctx->VertexProgram._Enabled
We may specify the point size in a glsl vertex shader.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46311
piglit: glsl-vs-point-size
NOTE: This is a candidate for stable release branches.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tom Stellard [Sat, 14 Jan 2012 13:08:33 +0000 (08:08 -0500)]
r300/compiler: Add support for inline literals
On R500 chips, shader instructions can take 7-bit (3-bit mantissa, 4-bit
exponent) floating point values as inputs in place of registers.
Christian König [Sat, 3 Mar 2012 09:52:34 +0000 (10:52 +0100)]
vl: fix shader in/out numbering
Fix all the other wrong numberings.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Eric Anholt [Wed, 29 Feb 2012 21:42:50 +0000 (13:42 -0800)]
egl: Also put a symlink from libEGL.so in lib/ for now.
This fixes the egl_gallium.so driver build when no system libEGL.so is
present, since it's relying on the lib/ to build against until it gets
converted to automake.
Kurt Roeckx [Sat, 3 Mar 2012 01:31:23 +0000 (17:31 -0800)]
i915: Fix i830 polygon stipple from PBOs.
This is a direct port of the i915 patch in
a856da63247a4b403f6350914f732e14d1530ed1.
Fixes glean's pbo test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41372
Reviewed-by: Eric Anholt <eric@anholt.net>
NOTE: This is a candidate for release branches.
Kurt Roeckx [Fri, 2 Mar 2012 23:34:45 +0000 (15:34 -0800)]
i915: Compute maximum number of verts using the actual batchbuffer size.
We were looking at the size of batch.map for how big the batchbuffer
was, but on 865 we just use a single-page batchbuffer due to hardware
limits.
v2: Removed check for sizeof map < bo->size, since that's always false.
[change by anholt]
NOTE: This is a candidate for release branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41495
Chris Wilson [Wed, 9 Nov 2011 22:21:16 +0000 (22:21 +0000)]
i830: Compute initial number of vertices from remaining batch space
In order to prevent an overflow of the batch buffer when emitting
triangles, we need to limit the initial primitive to fit within the
current batch. To do we need to measure the remaining space and thence
compute the maximum number of vertices that fit into that space.
Reported-by: Kurt Roeckx <kurt@roeckx.be>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41495
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
NOTE: This is a candidate for release branches.
Alban Browaeys [Thu, 2 Feb 2012 18:20:22 +0000 (19:20 +0100)]
dri/i915: Fix off-by-one in i830 clip region size.
The hardware, like i915, uses an inclusive bounds on min and max for
the drawing rectangle, but we were providing a number for exclusive.
The number of bits used by the hardware only covers this value going
up to the maximum size, so when we programmed 2048 as the maximum
inclusive X, it saw a maximum X of 0 and clipped all rendering. This
caused rendering failures in gnome-shell.
Fixes piglit fbo-maxsize.
v2: dropped changes to the blitter, which does use an exclusive x2, y2.
[change by anholt]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45558
Reviewed-by: Eric Anholt <eric@anholt.net>
NOTE: This is a candidate for release branches.
Eric Anholt [Fri, 2 Mar 2012 23:01:20 +0000 (15:01 -0800)]
intel: Don't enable GL_ARB_draw_instanced pre-gen4.
swtnl doesn't handle this extension.
Eric Anholt [Fri, 2 Mar 2012 21:09:51 +0000 (13:09 -0800)]
i915: Fix piglit fbo-nodepth-test on i830.
This is a direct port of
fc4fba52cf7e9616c70dd76b4d6bdba6582e157b from
i915, and fixes GPU hangs when running piglit.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41372
Reviewed-by: Eric Anholt <eric@anholt.net>
NOTE: This is a candidate for release branches.
Christian König [Fri, 2 Mar 2012 15:07:18 +0000 (16:07 +0100)]
vl/compositor: fix shader in/out numbering
Michel pointed out that my assumption of a global
index namespace is incorrect and breaks r300g.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Mon, 27 Feb 2012 11:13:14 +0000 (12:13 +0100)]
st/vdpau: implement OutputSurfaceQueryPutBitsYCbCrCapabilities
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Mon, 27 Feb 2012 11:06:28 +0000 (12:06 +0100)]
st/vdpau: implement OutputSurfacePutBitsYCbCr
v2: the csc_matrix is optional
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sun, 26 Feb 2012 14:00:00 +0000 (15:00 +0100)]
st/vdpau: implement VideoSurfaceGetBitsYCbCr
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sun, 26 Feb 2012 12:09:12 +0000 (13:09 +0100)]
st/vdpau: implement OutputSurfaceQueryGetPutBitsNativeCapabilities
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sun, 26 Feb 2012 12:01:55 +0000 (13:01 +0100)]
st/vdpau: implement OutputSurfaceGetBitsNative
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sun, 26 Feb 2012 11:40:47 +0000 (12:40 +0100)]
st/vdpau: implement OutputSurfacePutBitsNative
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sun, 26 Feb 2012 11:05:52 +0000 (12:05 +0100)]
st/vdpau: implement OutputSurfaceQueryPutBitsIndexedCapabilities
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Mon, 27 Feb 2012 15:50:01 +0000 (16:50 +0100)]
st/vdpau: fix default swizzle for Output/Bitmap samplers
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Mon, 27 Feb 2012 15:18:09 +0000 (16:18 +0100)]
st/vdpau: add support for per vertex colors
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sun, 26 Feb 2012 10:37:53 +0000 (11:37 +0100)]
st/vdpau: implement BitmapSurfaceQueryCapabilities
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sun, 26 Feb 2012 10:33:55 +0000 (11:33 +0100)]
st/vdpau: implement OutputSurfaceRenderBitmapSurface
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sat, 25 Feb 2012 23:34:11 +0000 (00:34 +0100)]
st/vdpau: implement BitmapSurfaceGetParameters
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sat, 25 Feb 2012 23:29:59 +0000 (00:29 +0100)]
st/vdpau: implement BitmapSurfacePutBitsNative
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sat, 25 Feb 2012 23:05:49 +0000 (00:05 +0100)]
st/vdpau: implement BitmapSurfaceCreate/Destroy
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sat, 25 Feb 2012 22:34:31 +0000 (23:34 +0100)]
st/vdpau: avoid an unnessasary copy
Delay the actual mixer rendering until we really
know which surface is the real destination.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Wed, 29 Feb 2012 14:12:42 +0000 (15:12 +0100)]
vl/csc: simplify matrix handling
A csc matrix is only 4x3 not 4x4, also define a VDPAU compatible type for it.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Wed, 29 Feb 2012 14:54:56 +0000 (15:54 +0100)]
vl/compositor: add support for per layer dst areas
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Mon, 27 Feb 2012 15:07:51 +0000 (16:07 +0100)]
vl/compositor: add per vertex color suport
Used in subtitles, for example.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sat, 25 Feb 2012 12:53:29 +0000 (13:53 +0100)]
vl/compositor: replace pipe_video_rect with u_rect
So we support things like flipping also.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Sat, 25 Feb 2012 12:09:17 +0000 (13:09 +0100)]
vl/compositor: split shaders and state
Signed-off-by: Christian König <deathsimple@vodafone.de>
Vinson Lee [Thu, 1 Mar 2012 05:20:53 +0000 (21:20 -0800)]
Revert "gallivm: Change getExtent and readByte to non-const with llvm-3.1."
This reverts commit
d5a6c172547d8964f4d4bb79637651decaf9deee.
llvm-3.1svn r151687 makes MemoryObject accessor members const again.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Brian Paul [Thu, 1 Mar 2012 14:20:16 +0000 (07:20 -0700)]
Revert "st/mesa: don't unreference user attribs up front."
This reverts commit
72931ca4b9fb1002f5b62b74f7f7f32e94e80fde.
This commit caused a few piglit regressions (quad-invariance, draw-batch,
etc) with the vmware svga driver.
Christian König [Sat, 25 Feb 2012 11:26:37 +0000 (12:26 +0100)]
vl: move dirty area handling into winsys abstraction
Fixing uninitialized areas in SwapBuffers mode.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Fri, 24 Feb 2012 15:47:52 +0000 (16:47 +0100)]
vl: hide X latency by using asynchronous requests
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Fri, 24 Feb 2012 15:12:27 +0000 (16:12 +0100)]
vl: use SwapBuffers instead of CopyBuffers
This should speed things up a bit, but also shows
some bugs with the kernel implementation.
v2: require xcb-dri2 version 1.8
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Fri, 24 Feb 2012 14:33:54 +0000 (15:33 +0100)]
st/xvmc: remove dst buffer texture workaround
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Thu, 23 Feb 2012 10:13:57 +0000 (11:13 +0100)]
vl: rewrite vl DRI backend using XCB
v2: also set array_size of texture
Signed-off-by: Christian König <deathsimple@vodafone.de>
José Fonseca [Thu, 1 Mar 2012 06:37:18 +0000 (06:37 +0000)]
egl: Don't include strings.h on Windows.
strings.h is needed for the declaration of strcasecmp(), but only on
non-Windows platforms.
Yuanhan Liu [Mon, 19 Sep 2011 10:25:54 +0000 (18:25 +0800)]
mesa: let GL3 buf obj queries not depend on opengl major version
While the ARB_map_buffer_range extension spec says nothing about these
queries -- they were added in GL 3.0 --, it seems like this could be an
error in the extension spec. This is one of the extensions, like
ARB_framebuffer_object, that "back ports" OpenGL 3.0 functionality to
previous versions. These extensions are supposed to provide identical
functionality to OpenGL 3.0. The other cases of mismatches have been
determined to be bugs in the extension specs.
And tools like apitrace rely on such queries to function properly.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Acked-by: Brian Paul <brianp@vmware.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
José Fonseca [Sat, 18 Feb 2012 12:02:17 +0000 (12:02 +0000)]
gallivm: Update comments and prototype of vector-selects.
No runtime behavior change. As vector selects are still not very well
supported by LLVM.
Brian Paul [Thu, 1 Mar 2012 03:53:47 +0000 (20:53 -0700)]
docs: remove mention of components no longer in main Mesa tree
Brian Paul [Thu, 1 Mar 2012 03:53:47 +0000 (20:53 -0700)]
st/mesa: remove old assertion
Brian Paul [Thu, 1 Mar 2012 03:53:46 +0000 (20:53 -0700)]
r300g: init chan=0 to silence warning
Kenneth Graunke [Mon, 27 Feb 2012 19:43:10 +0000 (11:43 -0800)]
i965: Disable PrimitiveID upload.
We currently don't support gl_PrimitiveID, and I believe asking the
hardware to generate it results in vertex cache invalidations.
This could result in slowdowns for applications that use gl_InstanceID,
which would be counter-productive. Just turn it off for now.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 9 Feb 2012 00:40:31 +0000 (16:40 -0800)]
i965: Enable the GL_ARB_draw_instanced extension.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 9 Feb 2012 00:59:39 +0000 (16:59 -0800)]
i965: Fix swizzles for system values such as gl_InstanceID.
visit(ir_variable *) sets dst_reg::writemask to the appropriate channel
for system values. Unfortunately, visit(ir_dereference_variable *) then
calls swizzle_for_size, which for a float, sets the swizzle to .x.
This works for gl_VertexID, since we store it in the .x component (see
brw_draw_upload.c:732 - VID), but fails for gl_InstanceID (IID) since we
store it in the .y channel.
To fix this, avoid calling swizzle_for_size on ir_var_system_values.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>