Commit graph

25472 commits

Author SHA1 Message Date
Pauli Nieminen
66513ba884 r300: Clean emit code.
This fixes some state atom check functions from returing wrong emit size.

There is emit code cleanup so that emit function selection is done in init
time instead of runtime.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:30 +03:00
Pauli Nieminen
d1a0ece907 radeon: Port flush preventation code from r200 to r100.
- emit prediction
- fixes to emit_sizes for data
- clean up of excesive use of radeonEnsureCmdBufferSpace

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:30 +03:00
Pauli Nieminen
60d156f688 r200: Make swtcl use state size prediction for flush.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:30 +03:00
Pauli Nieminen
e083f53ce4 r200: Remove unnecessery Elts from r200 context.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
9f7676c718 r200: Remove unnecessary calls to rcommonEnsureCmdBufSpace.
Calling EnsureCmdBufSpace is not required because rendering pipeline has to quarentee free space.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
0f41259eff r200: Fix atom->check call to return emit size for atom.
This patch makes render emit size prediction count the corect maximum emit size
for state.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
fb1d0bfd47 r200: Prevent flush in middle of rendering.
Patch adds prediction functionthat tries to predict emit size to the smallest
possible values that is quarenteed to be higher than worst case scenario in
rendering pipeline.

State emit size prediction code is in place but fix for emit sizes is included
in next patch.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
7f8f486b36 radeon/r200: Add -Wall to default build flags like it is in r300/r600
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:29 +03:00
Pauli Nieminen
45e3be3c07 glx: Make drawables persistent untill they are changed by glXMakeCurrent
This fixes bug that xdemos/manywin would segfault if it was run with command
./manywin 2. Demo is tring to call glXSwapBuffers while another context was
bind using glXMakeCurrent.

Fix is simple makes drawable and readable persistent untill they change or
context is destroyed.

I found a logic error when same dri context is used for multiple drawables
which caused readable and drawable to fall out of sync in special case. Fix
is simple just updating  drawables more often than in original patch.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-21 19:12:28 +03:00
Chia-I Wu
b1f156f0ec egl: Make _eglChooseDriver return the filename of the driver.
The real difference is that the driver suffix is now appended.  This
also fixes an annoying bug that EGL_DRIVER could not specify the path to
a driver because a suffix was always appended.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
5a459d58fc egl: Remove dependency on libX11.
libX11 is used to determine the screen number, which is in turned used
to determine the DRI driver.  However, the sysfs interface for
determining the DRI driver is gone, and no working driver depends on
this mechanism.

Display string parsing is moved to a new function,
_eglSplitDisplayString.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
1f871a4d15 egl_softpipe: Do not flush unlinked context.
An unlinked context is destroyed after _eglMakeCurrent.  Flushing such
context would cause segfault.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
408db29792 egl: Check for null display in handle checking.
The display may be NULL when checking a handle.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Jakob Bornecrantz
9b3e5df900 st/egl: Add support for drmModeDirtyFB command if found 2009-08-21 15:04:21 +02:00
Pauli Nieminen
0c0cea250d radeon: Add comment to explain logic for freeing dma buffers. 2009-08-21 16:40:14 +03:00
Ian Romanick
ac5551fbb9 ARB prog parser: Revert part of previous change to constant parsing
The commit "ARP prog parser: Implement the spec, not what makes sense"
broke the parsing of scalar constants.  This commit reverts that part
of that commit.  Now vp_swizzle.c passes.
2009-08-20 18:29:41 -07:00
Alex Deucher
ba48e78b1f r600: convert to using common radeon state atoms
switches more state handling to common code.  We need
should be more fine grained with the state atoms
eventually.
2009-08-20 18:55:41 -04:00
Alex Deucher
a47bb56d45 r600: improve state emission
Slowing migrating to atom based system like
the other radeon drivers.
2009-08-20 17:21:50 -04:00
Alex Deucher
ad36058e21 r600: split state emit into block specific functions
We probably want to go finer grained eventually, but
this is a good start.
2009-08-20 17:21:50 -04:00
Brian Paul
a215da5e9c progs/glsl: report compile/link times in shtest.c 2009-08-20 14:43:32 -06:00
Brian Paul
f300db379e progs/util: added GetShaderCompile/LinkTime() to get compilation/link times 2009-08-20 14:43:32 -06:00
Brian Paul
8a883d1657 progs/glsl: update multitex.shtest for new texture syntax 2009-08-20 14:43:32 -06:00
Brian Paul
0062bd68b3 progs/glsl: update shtest.c to handle 1D/3D/CUBE/RECT textures 2009-08-20 14:43:32 -06:00
Brian Paul
174054c973 progs/glsl: tweaks to shtest.c
1. Larger sphere to match cube size
2. Allow -geometry option to override window size
3. Cube samplers
2009-08-20 14:43:32 -06:00
Christoph Bumiller
d7c55555ac nv50: use VTX_ATTR_nF for constant vtxelts 2009-08-20 21:41:39 +02:00
Christoph Bumiller
6d1f63f520 nv50: set vertex buffer limits 2009-08-20 21:41:39 +02:00
Christoph Bumiller
80c5ab1586 nv50: modify vbo format to hw translation, add BGRA swizzle 2009-08-20 21:41:39 +02:00
Brian Paul
ce723d8d8b tgsi: check for SOA dependencies in SSE and PPC code generators
Fall back to interpreter for now.  This doesn't happen very often.
2009-08-20 10:34:45 -06:00
Brian Paul
4c7c294fff tgsi: handle SOA dependencies for MOV/SWZ
SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled.  For example:

MOV T, T.yxwz; would expand into:

  MOV t0, t1;
  MOV t1, t0;
  MOV t2, t3;
  MOV t3, t2;

The second instruction will produce the wrong result since we wrote to t0
in the first instruction.  We need to use an intermediate temporary to fix
this.

This will take more work to fix for all TGSI instructions.  This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.

Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.
2009-08-20 10:28:22 -06:00
Brian Paul
5e6d21afa4 tgsi: added tgsi_full_instruction::Flags field
Users of the parser can make use of this.
2009-08-20 10:25:55 -06:00
Jakob Bornecrantz
e93d41d24f st/egl: Open the first drm node
At least its better then hardcoded to i915
2009-08-20 17:50:30 +02:00
Brian Paul
94d14f6cd2 progs/glsl: more comments in shtest.c 2009-08-20 10:52:13 -06:00
Brian Paul
45cd9d80db tgsi: when printing/dumping programs indent loops and conditionals 2009-08-20 10:52:12 -06:00
Brian Paul
1645adc551 tgsi: check for SOA dependencies in SSE and PPC code generators
Fall back to interpreter for now.  This doesn't happen very often.
2009-08-20 10:52:12 -06:00
Brian Paul
013bd4da1a tgsi: handle SOA dependencies for MOV/SWZ
SOA dependencies can happen when a register is used both as a source and
destination and the source is swizzled.  For example:

MOV T, T.yxwz; would expand into:

  MOV t0, t1;
  MOV t1, t0;
  MOV t2, t3;
  MOV t3, t2;

The second instruction will produce the wrong result since we wrote to t0
in the first instruction.  We need to use an intermediate temporary to fix
this.

This will take more work to fix for all TGSI instructions.  This seems to
happen with MOV instructions more than anything else so fix that case now
and warn on others.

Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.
2009-08-20 10:52:12 -06:00
Brian Paul
fffcecc4d9 tgsi: added tgsi_full_instruction::Flags field
Users of the parser can make use of this.
2009-08-20 10:51:55 -06:00
Alex Deucher
0f0a9e3ee7 r600: try and get everything in the draw in one IB
fixes corruption issues with apps like teapot and
geartrain.
2009-08-20 12:12:23 -04:00
Alex Deucher
1b1d591373 r600: move misc regs from general state
These regs don't use the SET_CONTEXT_REG packet,
so they weren't getting set correctly.
2009-08-20 12:12:23 -04:00
Brian Paul
39ec4a9253 mesa: add GL_DEPTH_STENCIL to glCopyPixels error check
Plus, add a comment about 'type' error checking.
See bug 19087.
2009-08-20 08:12:16 -06:00
Alex Deucher
525ddb1f56 r600: rework emit code
make sure we allocate enough space for relocs
2009-08-20 03:38:49 -04:00
Pauli Nieminen
ec1540052b radeon: Update regulary cs processing info from kernel.
This fixes problem that dma buffers were leaking in dri1 mode.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-20 03:38:49 -04:00
Brian Paul
8604a896a6 gallium: rename copy/fill_rect utility functions 2009-08-19 13:17:58 -06:00
Brian Paul
4522cdbfdd gallium: fix tags target in Makefile.template 2009-08-19 13:17:58 -06:00
Alex Deucher
174aeabc0f radeon: fix typo in last dma patch 2009-08-19 13:07:39 -04:00
Eric Anholt
29e51c3872 intel: Fix failure to commit -a --amend before last push. 2009-08-19 09:30:47 -07:00
Eric Anholt
a70e131584 intel: Align cubemap texture height to its padding requirements. 2009-08-19 09:19:06 -07:00
Eric Anholt
b053474378 intel: Align untiled region height to 2 according to 965 docs.
This may or may not be required pre-965, but it doesn't seem unlikely, and
I'd rather be safe.
2009-08-19 09:19:06 -07:00
Pauli Nieminen
947df2e5a8 radeon: Add debug output for dma buffer object numbers.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-19 11:59:47 -04:00
Pauli Nieminen
66e019c6c9 radeon: Fix dma buffer object pool to scale object sizes.
This fixes problems when application is using large vertex arrays for drawing.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-19 11:59:34 -04:00
Alex Deucher
d551b3ac88 r600: minor cleanup 2009-08-19 11:59:03 -04:00