profile/ivi/mesa.git
14 years agor300g: fix hardlocks in occlusion queries
Marek Olšák [Fri, 18 Jun 2010 00:17:29 +0000 (02:17 +0200)]
r300g: fix hardlocks in occlusion queries

Early Z test (=ZTOP) must be disabled before a query is started,
otherwise the GPU is dead. The order of emitted registers matters more
than you might think.

This fixes hardlocks in sauerbraten.

14 years agor300g: debug option for fake occlusion queries
Marek Olšák [Fri, 18 Jun 2010 00:17:17 +0000 (02:17 +0200)]
r300g: debug option for fake occlusion queries

14 years agodraw: implement triangle strips with adjacency in geometry shader
Zack Rusin [Thu, 17 Jun 2010 17:21:38 +0000 (13:21 -0400)]
draw: implement triangle strips with adjacency in geometry shader

14 years agodraw: implement triangle lists with adjacency support in gs
Zack Rusin [Thu, 17 Jun 2010 16:05:15 +0000 (12:05 -0400)]
draw: implement triangle lists with adjacency support in gs

14 years agodraw: fix a silly error
Zack Rusin [Thu, 17 Jun 2010 15:13:18 +0000 (11:13 -0400)]
draw: fix a silly error

14 years agodraw: implement line strip adjacency
Zack Rusin [Thu, 17 Jun 2010 14:54:44 +0000 (10:54 -0400)]
draw: implement line strip adjacency

14 years agodraw: implement lines with adjacency in geometry shaders
Zack Rusin [Thu, 17 Jun 2010 14:48:23 +0000 (10:48 -0400)]
draw: implement lines with adjacency in geometry shaders

14 years agodraw: validate stream output buffers
Zack Rusin [Thu, 17 Jun 2010 14:47:10 +0000 (10:47 -0400)]
draw: validate stream output buffers

fixes a crash.

14 years agodraw: fix some unsigned issue
Zack Rusin [Thu, 17 Jun 2010 08:59:48 +0000 (04:59 -0400)]
draw: fix some unsigned issue

spotted by Vinson

14 years agoegl: s/EGL_DISPLAY/EGL_PLATFORM/.
Chia-I Wu [Thu, 17 Jun 2010 08:07:46 +0000 (16:07 +0800)]
egl: s/EGL_DISPLAY/EGL_PLATFORM/.

A platform is already used to mean a window system in EGL.  No need to
use a different term.

14 years agoegl: s/_EGL_PLATFORM/_EGL_OS/ and s/POSIX/UNIX/.
Chia-I Wu [Tue, 15 Jun 2010 11:34:51 +0000 (19:34 +0800)]
egl: s/_EGL_PLATFORM/_EGL_OS/ and s/POSIX/UNIX/.

A platform means a native window system in EGL.  Use OS that follows
Gallium instead.

14 years agost/egl: Build sw/fbdev winsys for fbdev backend.
Chia-I Wu [Thu, 17 Jun 2010 06:10:53 +0000 (14:10 +0800)]
st/egl: Build sw/fbdev winsys for fbdev backend.

Target egl_fbdev_swrast.so needs sw/fbdev/libfbdev.a.

14 years agor300g: more reasonable MSPOS defaults in error path
Marek Olšák [Thu, 17 Jun 2010 03:14:24 +0000 (05:14 +0200)]
r300g: more reasonable MSPOS defaults in error path

14 years agor300g: fix surface leaks
Marek Olšák [Thu, 17 Jun 2010 03:11:07 +0000 (05:11 +0200)]
r300g: fix surface leaks

14 years agogallium/docs: GLSL glossary entry.
Corbin Simpson [Thu, 17 Jun 2010 01:57:51 +0000 (18:57 -0700)]
gallium/docs: GLSL glossary entry.

14 years agogallium/docs: Explain DFRACEXP/DLDEXP.
Corbin Simpson [Thu, 17 Jun 2010 01:45:50 +0000 (18:45 -0700)]
gallium/docs: Explain DFRACEXP/DLDEXP.

14 years agogallium/docs: Remove unneeded "doubles", add double blurb.
Corbin Simpson [Thu, 17 Jun 2010 01:34:51 +0000 (18:34 -0700)]
gallium/docs: Remove unneeded "doubles", add double blurb.

14 years agogallium/docs: Label opcodes by capability bits.
Corbin Simpson [Thu, 17 Jun 2010 01:34:32 +0000 (18:34 -0700)]
gallium/docs: Label opcodes by capability bits.

14 years agogallium/docs: R and RG texture swizzles.
Corbin Simpson [Wed, 16 Jun 2010 23:56:55 +0000 (16:56 -0700)]
gallium/docs: R and RG texture swizzles.

We *did* reach an agreement on this a few months ago, and now the docs
reflect it. However, we never got around to UV and Z...

14 years agogallium/docs: Flesh out the distro information.
Corbin Simpson [Wed, 16 Jun 2010 23:52:52 +0000 (16:52 -0700)]
gallium/docs: Flesh out the distro information.

I'm not sure I picked the best voice here. I might come back to this
later.

14 years agogallium/docs: Fix RST error.
Corbin Simpson [Wed, 16 Jun 2010 18:10:46 +0000 (11:10 -0700)]
gallium/docs: Fix RST error.

14 years agor300g: Fix uninitialized variable warnings in error path.
Vinson Lee [Thu, 17 Jun 2010 00:56:00 +0000 (17:56 -0700)]
r300g: Fix uninitialized variable warnings in error path.

14 years agointel: Remove unnecessary headers.
Vinson Lee [Thu, 17 Jun 2010 00:44:26 +0000 (17:44 -0700)]
intel: Remove unnecessary headers.

14 years agodraw: make sure we correctly iterate over output buffers on stream out
Zack Rusin [Wed, 16 Jun 2010 19:56:17 +0000 (15:56 -0400)]
draw: make sure we correctly iterate over output buffers on stream out

we kept overwriting the first attribute of a vertex in a single-stream-
out-buffer case

14 years agograw: remove wrong test
Zack Rusin [Wed, 16 Jun 2010 19:10:21 +0000 (15:10 -0400)]
graw: remove wrong test

14 years agodraw: add stream output decomposition file
Zack Rusin [Wed, 16 Jun 2010 19:03:55 +0000 (15:03 -0400)]
draw: add stream output decomposition file

14 years agodraw: rewrite stream output to handle all the dark corners
Zack Rusin [Wed, 16 Jun 2010 18:42:17 +0000 (14:42 -0400)]
draw: rewrite stream output to handle all the dark corners

register masks, multiple output buffers, multiple primitives,
non-linear vertices (elts) and stride semantics.

14 years agotranslate: don't crash on elts paths with instances
Zack Rusin [Wed, 16 Jun 2010 12:52:33 +0000 (08:52 -0400)]
translate: don't crash on elts paths with instances

14 years agor300g: Fix up resolve.
Corbin Simpson [Wed, 16 Jun 2010 18:01:34 +0000 (11:01 -0700)]
r300g: Fix up resolve.

Yay for old code.

14 years agor300g: Fix MSAA state size.
Corbin Simpson [Wed, 16 Jun 2010 17:51:35 +0000 (10:51 -0700)]
r300g: Fix MSAA state size.

14 years agor300g: Don't multisample non-32-bpp render targets.
Corbin Simpson [Wed, 16 Jun 2010 17:51:04 +0000 (10:51 -0700)]
r300g: Don't multisample non-32-bpp render targets.

14 years agor300g: Finish resolve function.
Corbin Simpson [Wed, 16 Jun 2010 17:50:37 +0000 (10:50 -0700)]
r300g: Finish resolve function.

14 years agor300g: Add resource resolve function.
Corbin Simpson [Mon, 14 Jun 2010 03:52:58 +0000 (20:52 -0700)]
r300g: Add resource resolve function.

14 years agor300g: Moar MSAA setup.
Corbin Simpson [Wed, 26 May 2010 05:33:21 +0000 (22:33 -0700)]
r300g: Moar MSAA setup.

Need to just add the resolve, then go switch to new DRM and test.

14 years agor300g: Fix indentation.
Corbin Simpson [Wed, 26 May 2010 04:57:10 +0000 (21:57 -0700)]
r300g: Fix indentation.

I could *not* let this slide since I'm on a 78-char-wide terminal.

14 years agor300g: Old MSAA code from before gallium-msaa.
Corbin Simpson [Wed, 26 May 2010 04:45:38 +0000 (21:45 -0700)]
r300g: Old MSAA code from before gallium-msaa.

14 years agoutil: add alloc check
Alan Hourihane [Wed, 16 Jun 2010 17:10:34 +0000 (18:10 +0100)]
util: add alloc check

14 years agodraw: add alloc check
Alan Hourihane [Wed, 16 Jun 2010 16:55:00 +0000 (17:55 +0100)]
draw: add alloc check

14 years agor600: GL_COORD_REPLACE state is only relevant when point sprites are enabled.
Henri Verbeet [Wed, 16 Jun 2010 16:46:07 +0000 (12:46 -0400)]
r600: GL_COORD_REPLACE state is only relevant when point sprites are enabled.

14 years agor600: fix warnings
Marc [Wed, 16 Jun 2010 16:44:02 +0000 (12:44 -0400)]
r600: fix warnings

14 years agoosmesa: always build standalone for internal symbols
Dan Nicholson [Wed, 16 Jun 2010 16:23:17 +0000 (09:23 -0700)]
osmesa: always build standalone for internal symbols

When building OSMesa and xlib GL, the resulting OSMesa would be linked
against libGL instead of the internal mesa libraries. However, when
building with -fvisibility=hidden, some of the internal functions used
in OSMesa could not be resolved through libGL.

Instead, always build OSMesa standalone without linking against libGL.
This has the advantage that OSMesa is always built the same way, but it
means that disk space is wasted when libGL is installed since both
libraries will contain the internal objects.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Tom Fogal <tfogal@alumni.unh.edu>
14 years agodraw: handle some out of memory conditions
Alan Hourihane [Wed, 16 Jun 2010 11:27:20 +0000 (12:27 +0100)]
draw: handle some out of memory conditions

14 years agograw: add a gs test for non-sequential inputs
Zack Rusin [Wed, 16 Jun 2010 09:25:20 +0000 (05:25 -0400)]
graw: add a gs test for non-sequential inputs

14 years agodraw: Remove unnecessary headers.
Vinson Lee [Wed, 16 Jun 2010 00:34:59 +0000 (17:34 -0700)]
draw: Remove unnecessary headers.

14 years agogs: make sure we end primitives when finishing executing shaders
Zack Rusin [Tue, 15 Jun 2010 20:37:32 +0000 (16:37 -0400)]
gs: make sure we end primitives when finishing executing shaders

14 years agodraw/gs: make sure gs works with elts and doesn't overrun the buffer
Zack Rusin [Tue, 15 Jun 2010 20:09:30 +0000 (16:09 -0400)]
draw/gs: make sure gs works with elts and doesn't overrun the buffer

14 years agomesa: Allow querying the system FBO in GetFramebufferAttachmentParameteriv
Kristian Høgsberg [Tue, 15 Jun 2010 17:07:01 +0000 (13:07 -0400)]
mesa: Allow querying the system FBO in GetFramebufferAttachmentParameteriv

        If the default framebuffer is bound to <target>, then
        <attachment> must be one of FRONT_LEFT, FRONT_RIGHT, BACK_LEFT,
        BACK_RIGHT, AUXi, DEPTH_BUFFER, or STENCIL_BUFFER, identifying a
        color buffer, the depth buffer, or the stencil buffer, and
        <pname> may be FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE or
        FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.

as well as these <pname> values

        FRAMEBUFFER_ATTACHMENT_RED_SIZE,
        FRAMEBUFFER_ATTACHMENT_GREEN_SIZE,
        FRAMEBUFFER_ATTACHMENT_BLUE_SIZE,
        FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE,
        FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE,
        FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE,
        FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE, or
        FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING.

https://bugs.freedesktop.org/show_bug.cgi?id=28551

14 years agograw: test multiple cb's in geometry shaders
Zack Rusin [Tue, 15 Jun 2010 16:14:18 +0000 (12:14 -0400)]
graw: test multiple cb's in geometry shaders

14 years agograw: fix setup for multiple constant buffers
Zack Rusin [Tue, 15 Jun 2010 16:01:47 +0000 (12:01 -0400)]
graw: fix setup for multiple constant buffers

14 years agodraw: run the pipeline with the correct number of verts
Zack Rusin [Tue, 15 Jun 2010 13:11:10 +0000 (09:11 -0400)]
draw: run the pipeline with the correct number of verts

verts per primitive, not total count

14 years agodraw: fix primitive indexing in the pipeline
Zack Rusin [Tue, 15 Jun 2010 12:49:00 +0000 (08:49 -0400)]
draw: fix primitive indexing in the pipeline

spotted by Keith

14 years agodraw: finish the new pipeline setup
Zack Rusin [Tue, 15 Jun 2010 12:05:51 +0000 (08:05 -0400)]
draw: finish the new pipeline setup

Keith came up with a new way of running the pipeline which involves passing
a few info structs around (for fetch, vertices and prims) and allows us
to correctly handle cases where we endup with multiple primitives generated
by the pipeline itself.

14 years agosoftpipe/gs: fix a crash when a gs isn't present
Zack Rusin [Tue, 15 Jun 2010 10:12:56 +0000 (06:12 -0400)]
softpipe/gs: fix a crash when a gs isn't present

14 years agodraw wip
Keith Whitwell [Mon, 14 Jun 2010 14:11:59 +0000 (15:11 +0100)]
draw wip

14 years agoi965: Remove unnecessary header.
Vinson Lee [Tue, 15 Jun 2010 00:50:15 +0000 (17:50 -0700)]
i965: Remove unnecessary header.

14 years agor300g: initialize US_CODE_BANK on r4xx
Marek Olšák [Mon, 14 Jun 2010 21:38:48 +0000 (23:38 +0200)]
r300g: initialize US_CODE_BANK on r4xx

14 years agoi965: Fix surface state dumping with INTEL_DEBUG=batch.
Eric Anholt [Sun, 13 Jun 2010 07:41:01 +0000 (00:41 -0700)]
i965: Fix surface state dumping with INTEL_DEBUG=batch.

I broke this with the state streaming changes.

14 years agoi965: correct the gen6 line stipple enable define.
Zhenyu Wang [Sun, 13 Jun 2010 05:39:29 +0000 (22:39 -0700)]
i965: correct the gen6 line stipple enable define.

14 years agointel: Remove long-dead comment about releasing texture heaps.
Eric Anholt [Sun, 13 Jun 2010 04:51:37 +0000 (21:51 -0700)]
intel: Remove long-dead comment about releasing texture heaps.

BOs are stored in the bufmgr, which is freed as part of the screen
structure.

14 years agogallivm: Omit references to NoFramePointerElimNonLeaf
José Fonseca [Mon, 14 Jun 2010 16:36:17 +0000 (17:36 +0100)]
gallivm: Omit references to NoFramePointerElimNonLeaf

It was added after 2.7.

14 years agoutil: Use int type for format field width.
José Fonseca [Mon, 14 Jun 2010 16:11:21 +0000 (17:11 +0100)]
util: Use int type for format field width.

As suggested by gcc warning.

14 years agogallivm: Override some of the default target options.
José Fonseca [Sun, 13 Jun 2010 12:13:11 +0000 (13:13 +0100)]
gallivm: Override some of the default target options.

In particular:
- enable LLVM <-> GDB integration for JIT code
- disable frame-pointer elimination on debug/profile builds
- enable fast-math.

14 years agogallivm: Use func_to_pointer().
José Fonseca [Thu, 10 Jun 2010 15:23:25 +0000 (16:23 +0100)]
gallivm: Use func_to_pointer().

14 years agoutil: Add a func_to_pointer util function too.
José Fonseca [Thu, 10 Jun 2010 15:22:49 +0000 (16:22 +0100)]
util: Add a func_to_pointer util function too.

14 years agograw: small fixups for the gs examples
Zack Rusin [Mon, 14 Jun 2010 14:48:40 +0000 (10:48 -0400)]
graw: small fixups for the gs examples

14 years agor300g: fix uploading RC state shader constants on r3xx
Marek Olšák [Mon, 14 Jun 2010 11:03:13 +0000 (13:03 +0200)]
r300g: fix uploading RC state shader constants on r3xx

I've messed this up in one of my previous commits.

Reported-by: Igor Murzov
14 years agor300g: drop begin_cs/end_cs
Marek Olšák [Sun, 13 Jun 2010 23:20:14 +0000 (01:20 +0200)]
r300g: drop begin_cs/end_cs

I have had a look at the libdrm sources and they just contain more or less
the same checking we do in macros, and begin_cs may realloc the CS buffer
if we overflow it, which never happens with r300g. So these are pretty
much useless.

There is a small but measurable performance increase by dropping the two
functions.

14 years agor300g: rewrite occlusion queries
Marek Olšák [Mon, 14 Jun 2010 03:18:47 +0000 (05:18 +0200)]
r300g: rewrite occlusion queries

The previous implementation had issues with queries spanning over several
command streams as well as using a very large number of queries.

This fixes flickering in Enemy Territory: Quake Wars. The driver now renders
everything correctly in this game and the graphics is awesome.

14 years agor300g: emit viewport state as a dword table
Marek Olšák [Mon, 14 Jun 2010 00:51:29 +0000 (02:51 +0200)]
r300g: emit viewport state as a dword table

14 years agor300g: subclass pipe_surface
Marek Olšák [Mon, 14 Jun 2010 00:28:44 +0000 (02:28 +0200)]
r300g: subclass pipe_surface

14 years agor300g: simplify reloc macros
Marek Olšák [Mon, 14 Jun 2010 00:26:02 +0000 (02:26 +0200)]
r300g: simplify reloc macros

14 years agor300g: count CS dwords on debug builds only
Marek Olšák [Sun, 13 Jun 2010 19:16:00 +0000 (21:16 +0200)]
r300g: count CS dwords on debug builds only

14 years agor300g: optimize emission of fragment shader constants
Marek Olšák [Sun, 13 Jun 2010 04:39:58 +0000 (06:39 +0200)]
r300g: optimize emission of fragment shader constants

14 years agor300g: turn fragment shader into a CB
Marek Olšák [Sun, 13 Jun 2010 04:11:54 +0000 (06:11 +0200)]
r300g: turn fragment shader into a CB

14 years agor300g: turn depth stencil state into a CB
Marek Olšák [Sun, 13 Jun 2010 03:31:48 +0000 (05:31 +0200)]
r300g: turn depth stencil state into a CB

14 years agor300g: turn clip state into a CB
Marek Olšák [Sun, 13 Jun 2010 02:37:45 +0000 (04:37 +0200)]
r300g: turn clip state into a CB

14 years agor300g: turn blend color into a CB
Marek Olšák [Sun, 13 Jun 2010 01:25:39 +0000 (03:25 +0200)]
r300g: turn blend color into a CB

14 years agor300g: turn blend state into a CB
Marek Olšák [Sun, 13 Jun 2010 00:36:08 +0000 (02:36 +0200)]
r300g: turn blend state into a CB

14 years agor300g: add API for building command buffers
Marek Olšák [Sat, 12 Jun 2010 22:31:04 +0000 (00:31 +0200)]
r300g: add API for building command buffers

The idea is to build a hardware command buffer for every CSO and memcpy
the buffer to a command stream at bind time (or dirty-state-emission time,
to be precise).

14 years agor300g: inline FLUSH_CS
Marek Olšák [Sat, 12 Jun 2010 21:45:02 +0000 (23:45 +0200)]
r300g: inline FLUSH_CS

The fewer macros, the better.

14 years agor300g: reorder CS macros and document them a little
Marek Olšák [Sat, 12 Jun 2010 21:39:23 +0000 (23:39 +0200)]
r300g: reorder CS macros and document them a little

14 years agor300g: drop DBG_CS
Marek Olšák [Sat, 12 Jun 2010 21:22:48 +0000 (23:22 +0200)]
r300g: drop DBG_CS

I'd like the CS macros to be as lightweight as possible for performance
reasons.

14 years agor300g: inline CHECK_CS
Marek Olšák [Sat, 12 Jun 2010 21:01:57 +0000 (23:01 +0200)]
r300g: inline CHECK_CS

14 years agor300g: replace r300_cs_info with simplier get_cs_free_dwords
Marek Olšák [Sat, 12 Jun 2010 20:07:41 +0000 (22:07 +0200)]
r300g: replace r300_cs_info with simplier get_cs_free_dwords

14 years agor300g: fix multiple render targets
Marek Olšák [Sat, 12 Jun 2010 19:56:37 +0000 (21:56 +0200)]
r300g: fix multiple render targets

This fixes tests/drawbuffers.

14 years agor300g: remove r300_state.h
Marek Olšák [Sat, 12 Jun 2010 19:35:30 +0000 (21:35 +0200)]
r300g: remove r300_state.h

14 years agor300g: move two-sided stencilref fallback to its own file
Marek Olšák [Sat, 12 Jun 2010 19:30:37 +0000 (21:30 +0200)]
r300g: move two-sided stencilref fallback to its own file

14 years agor300g: move index buffer translate functions to their new home
Marek Olšák [Sat, 12 Jun 2010 19:16:41 +0000 (21:16 +0200)]
r300g: move index buffer translate functions to their new home

14 years agor300g: add fallback for unaligned/unsupported vertex stride/offset/format
Marek Olšák [Tue, 8 Jun 2010 21:46:40 +0000 (23:46 +0200)]
r300g: add fallback for unaligned/unsupported vertex stride/offset/format

There is a problem though, the translate module cannot emit half float
vertices.

14 years agor300g: upload only vertex buffers referenced by vertex elements
Marek Olšák [Sat, 12 Jun 2010 18:34:50 +0000 (20:34 +0200)]
r300g: upload only vertex buffers referenced by vertex elements

14 years agoi965: Fix gen6 front cull mode.
Eric Anholt [Fri, 11 Jun 2010 22:14:22 +0000 (15:14 -0700)]
i965: Fix gen6 front cull mode.

14 years agoi965: Use the new message header format for FF_SYNC on gen6.
Zhenyu Wang [Sun, 13 Jun 2010 04:37:14 +0000 (21:37 -0700)]
i965: Use the new message header format for FF_SYNC on gen6.

14 years agoi965: Add support for math instructions in the gen6 WM.
Zhenyu Wang [Sun, 13 Jun 2010 04:30:20 +0000 (21:30 -0700)]
i965: Add support for math instructions in the gen6 WM.

14 years agoi965: Set the correct WM GRF start reg on gen6.
Zhenyu Wang [Sun, 13 Jun 2010 04:19:38 +0000 (21:19 -0700)]
i965: Set the correct WM GRF start reg on gen6.

14 years agoi965: Update gen6 paths for the streaming rework.
Eric Anholt [Fri, 11 Jun 2010 22:35:52 +0000 (15:35 -0700)]
i965: Update gen6 paths for the streaming rework.

14 years agoi965: Stream out CC unit state.
Eric Anholt [Fri, 11 Jun 2010 20:21:59 +0000 (13:21 -0700)]
i965: Stream out CC unit state.

before:
[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]       gl            firefox-talos-gfx   31.791   32.287   1.11%    6/6
after:
[  0]       gl            firefox-talos-gfx   31.198   31.675   0.96%    6/6

14 years agodraw/gs: copy the outputs only if we emitted something
Zack Rusin [Sat, 12 Jun 2010 14:44:31 +0000 (10:44 -0400)]
draw/gs: copy the outputs only if we emitted something

14 years agosoftpipe: small cleanup
Zack Rusin [Sat, 12 Jun 2010 14:40:39 +0000 (10:40 -0400)]
softpipe: small cleanup

14 years agor300/compiler: fix scons build
Joakim Sindholt [Sat, 12 Jun 2010 13:39:13 +0000 (15:39 +0200)]
r300/compiler: fix scons build

14 years agoi965: Remove unnecessary header.
Vinson Lee [Sat, 12 Jun 2010 08:44:43 +0000 (01:44 -0700)]
i965: Remove unnecessary header.