Commit graph

4252 commits

Author SHA1 Message Date
José Fonseca
02c523dfbb tgsi: Only free temp uregs.
Shorthand.
(cherry picked from commit de911220bbbe74cff0c79b260456ff36122b7b5b)
2009-08-24 12:11:24 +01:00
José Fonseca
acc7da9035 tgsi: Pass pipe_context as a parameter to ureg_create_shader.
Simplifies migration to tgsi_ureg.
(cherry picked from commit f574398c07c41cb8d31249a7186fc178ef7d552a)
2009-08-24 12:11:22 +01:00
Keith Whitwell
b570a7e6b6 tgsi: add generic instruction builder
When translating an incoming shader (rather than building one from scratch)
it's preferable to be able to call a single, generic instruction emitter
rather than figuring out which of the opcode-specific functions to call.
2009-08-24 11:33:38 +01:00
Cooper Yuan
7ee4f32dcd r300g: Set the vector address in the input memory for bypass_vs_clip_and_viewport case 2009-08-24 13:56:23 +08:00
Jakob Bornecrantz
54fb71b863 st/dri: Remove some debug prints 2009-08-22 02:16:02 +01:00
Jakob Bornecrantz
a3e59b9d06 st/dri: Find out if the drawable is a pixmap
Part of this code is disabled since no performance gains
	where detected with it enabled.

	This code only detects if it is a pixmap that it is
	rendering to on the st/xorg DDX since it sets the fake
	front to the same handle as front.
2009-08-22 02:16:02 +01:00
Jakob Bornecrantz
6237ac2412 st/dri: Fix frontbuffer rendering with DRI2 2009-08-22 02:16:01 +01:00
Jakob Bornecrantz
29165a2fcc st/xorg: Handle fake fronts correctly for pixmaps 2009-08-22 02:10:18 +01:00
Jakob Bornecrantz
a469b4c459 i915g: Remove bad assert on fence 2009-08-22 02:09:59 +01: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
Jakob Bornecrantz
9b3e5df900 st/egl: Add support for drmModeDirtyFB command if found 2009-08-21 15:04:21 +02: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
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
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
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
José Fonseca
c69d9296fb tgsi: Add missing include.
(cherry picked from commit d2787c02c130b1fe20d0c032d468622f2fdaef79)
2009-08-19 12:03:34 +01:00
José Fonseca
b2f3f7dd12 tgsi: Fix typo in ureg constant creation.
(cherry picked from commit aa40c9abc7787fdf46cb661a4d0bb8bec513fc63)
2009-08-19 12:03:10 +01:00
Keith Whitwell
dd5ac3cafc st/xlib: remove a couple more 'fake' references 2009-08-19 12:02:53 +01:00
Keith Whitwell
515a820021 st/xlib: remove dead ungrab helper 2009-08-19 12:02:53 +01:00
Keith Whitwell
65079afcde tgsi: silence compiler warning 2009-08-19 12:00:24 +01:00
Keith Whitwell
7dc5527592 tgsi: remove unused function argument 2009-08-19 12:00:03 +01:00
Keith Whitwell
265e210edb tgsi: add missing functionality to support instructions with labels
Could previously emit opcodes with label arguments, but was no way to
patch them with the actual destinations of those labels.

Adds two functions:

  ureg_get_instruction_number - to get the id of the next instruction
     to be emitted

  ureg_fixup_label - to patch an emitted label to point to a given
     instruction number.

Need some more complex examples than u_simple_shader, so far this has
only been compile-tested.
2009-08-19 11:54:26 +01:00
Corbin Simpson
e327845e2b r300g: Force off ZTOP optimizations for now. 2009-08-18 21:25:53 -07:00
Corbin Simpson
0086a84e2d r300g: Utilize DONTBLOCK.
Also ALGYRHYTHMS.
2009-08-18 21:25:53 -07:00
Corbin Simpson
c0bc070ff5 radeon-gallium: Oh, look, we *do* already support DONTBLOCK.
Well, okay, the kernel doesn't, but that's no excuse for us! :3
2009-08-18 21:25:53 -07:00
Corbin Simpson
a381ee8266 r300g: Massively cleanup OQ.
Still broken, but compiles cleaner, behaves better, etc.
2009-08-18 21:25:53 -07:00
Corbin Simpson
4092f318db r300g: Add high_second_pipe cap for R3xx chipsets.
This name is totally subject to change if ever I need to separate R3xx
for some other reason.
2009-08-18 21:25:53 -07:00
Corbin Simpson
14378cbd2d radeon-gallium: Stop using outdated ioctls. 2009-08-18 21:25:53 -07:00
Corbin Simpson
c63bd15f81 Revert "r300-gallium, radeon-gallium: Nuke gb_pipes from orbit."
This reverts commit 6a40d1e9d9.

Turns out that we *do* need these for OQ after all. Go figure.

Conflicts:

	src/gallium/winsys/drm/radeon/core/radeon_r300.h
2009-08-18 21:25:53 -07:00
Brian Paul
73fc09a7bf Merge branch 'mesa_7_5_branch' 2009-08-18 17:55:27 -06:00
Brian Paul
e4aa62a6ce egl/xlib: move call to create_configs() after we set the Xdpy field 2009-08-18 17:54:44 -06:00
Brian Paul
3097d7dbf8 tgsi/ppc: we don't implement saturation modes yet 2009-08-18 17:50:52 -06:00
Brian Paul
fab17c1216 tgsi/sse: we don't implement saturation modes yet
Fixes piglit fp-generic tests/shaders/generic/lrp_sat.fp, bug 23316.
2009-08-18 17:50:00 -06:00
Jakob Bornecrantz
657109bbc6 egl: Create the front texture the properly 2009-08-18 18:51:41 +01:00
Brian Paul
1c1ee1176d gallium: improved comments, minor whitespace changes 2009-08-18 09:31:22 -06:00
Chia-I Wu
5a2c9372a0 egl: Some per-driver data should be per-display.
Move some fields of _EGLDriver to _EGLDisplay.  It also becomes
unnecessary to pass _EGLDisplay to drivers when _eglMain is called.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:49:09 -06:00
Chia-I Wu
2f2cf461c5 egl: Overhaul driver API.
The motivation is so that drivers do not need to look up and check for
bad display, context, and etc.  It also becomes unnecessary for drivers
to call the link functions.

This commit makes eglapi.[ch] do the lookup and check.  As a result, the
driver API is overhauled, and almost all sources and drivers need
update.  The updates are mainly find and replace with human brains.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:44:34 -06:00
Brian Paul
3aafd22f6a gallium: memset() tgsi_exec_machine to all zeros in tgsi_exec_machine_create()
This fixes invalid values for CondStackTop, LoopStackTop, etc.
2009-08-17 17:13:17 -06:00
Maarten Maathuis
caf40d5d14 nv50: remove a few cases of directly casting struct pipe_context 2009-08-17 18:48:14 +02:00
Maarten Maathuis
97cc526eb7 nv50: borrow some flushing code from the ddx
- This fixes neverball corruption.
- I'm unsure about what we're actually flushing here.
2009-08-17 18:48:14 +02:00
Maarten Maathuis
f199dbdb76 gallium: Make PIPE_TRANSFER_{READ,WRITE,READ_WRITE} bitmask friendly. 2009-08-17 18:48:14 +02:00
Maarten Maathuis
93ce4c99d4 nv50: whitespace fixes and deobfuscation 2009-08-17 18:48:13 +02:00
Brian Paul
7c4223876b cell: fix incorrect pipe_transfer tests
The value is an enum, not a bitmask.
2009-08-17 08:28:22 -06:00
Christoph Bumiller
0204c7d8d7 nv50: fix stencil state
It's the front stencil methods that have contiguous offsets,
not the back ones.
Unfortunately the names in the header still have FRONT/BACK
reversed, so I'm using hex values until it gets updated.
2009-08-17 12:26:54 +02:00