Commit graph

22678 commits

Author SHA1 Message Date
Brian Paul
ebfbd8c4fe i965: disable debug printf 2009-04-22 13:46:58 -06:00
Brian Paul
ac22178eb0 i965: enable VS constant buffers
In the VS constants can now be handled in two different ways:
1. If there's room in the GRF, put constants there.  They're preloaded from
   the CURBE prior to VS execution.  This is the historical approach.  The
   problem is the GRF may not have room for all the shader's constants and
   temps and misc registers.  Hence...
2. Use a separate constant buffer which is read from using a READ message.
   This allows a very large number of constants and frees up GRF regs for
   shader temporaries.  This is the new approach.  May be a little slower
   than 1.

1 vs. 2 is chosen according to how many constants and temps the shader needs.
2009-04-22 11:52:16 -06:00
Brian Paul
5c8fb6acc1 i965: define BRW_MAX_GRF 2009-04-22 11:47:59 -06:00
Brian Paul
21a422d97e i965: remove old code to init surface-related cache IDs
These types are only found in the new surface state cache now.
2009-04-22 11:29:49 -06:00
Brian Paul
c0c58cf5cf i965: comments, reformatting 2009-04-22 11:28:24 -06:00
Brian Paul
4843e54fc6 i965: actually use the new, second surface state cache 2009-04-22 11:12:07 -06:00
Brian Paul
f9af97c7a5 i965: checkpoint commit: use two state caches instead of one
The new, second cache will only be used for surface-related items.
Since we can create many surfaces the original, single cache could get
filled quickly.  When we cleared it, we had to regenerate shaders, etc.
With two caches, we can avoid doing that.
2009-04-22 11:08:46 -06:00
Brian Paul
a071a8d2e7 i965: remove unused state atom entries 2009-04-22 10:44:36 -06:00
Brian Paul
f428255bde i965: the brw_constant_buffer state atom is no longer dynamic
No more dynamic atoms so we can simplify the state validation code a little.
2009-04-22 09:23:15 -06:00
Brian Paul
e5681fc176 i965: add _NEW_PROGRAM_CONSTANTS to mesa_bits[] list 2009-04-22 09:16:21 -06:00
Brian Paul
a36dd5d54e i915: check the new _NEW_PROGRAM_CONSTANT flag 2009-04-22 09:14:53 -06:00
Brian Paul
1dbab84e21 i965: use _NEW_PROGRAM_CONSTANTS and always create new const buffers
When program constants change we create a new VS constant buffer
instead of re-using the old one.  This allows us to have several
const buffers in flight with vertex rendering.
2009-04-22 09:14:16 -06:00
Brian Paul
6b6a23c0f7 i965: updates to some debug code 2009-04-22 09:07:46 -06:00
Brian Paul
817dcdd280 i965: use new _NEW_PROGRAM_CONSTANTS flag instead of dynamic flags 2009-04-22 09:07:02 -06:00
Brian Paul
f48473e425 r200/r300/r500: add _NEW_PROGRAM_CONSTANTS flag
Make sure we detect constant buffer changes indicated by the new flag.
Should be able to remove _NEW_PROGRAM (and _NEW_MODELVIEW, _NEW_LIGHT, etc)
from several places (someday.
2009-04-22 08:59:47 -06:00
Brian Paul
7843243dee st: also check _NEW_PROGRAM flag for vertex shader constant buffers
This is a follow-on to commit c1a3b85280.
Note that (at this time) wherever _NEW_PROGRAM_CONSTANTS is set we're still
setting _NEW_PROGRAM so this won't really make any difference (for now).
2009-04-22 07:58:25 -06:00
Thomas Hellstrom
f057f6543d gallium: Reinstate unconditional flushes.
Lost in commit e50dd26ca6.

Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
2009-04-22 11:42:46 +02:00
Keith Whitwell
009749b4a8 mesa: protect driver.flush() with FLUSH_CURRENT
Need to do this to ensure vbo code unmaps its buffers before calling
the driver, which may be sitting on top of a memory manager which
objects to firing commands from a mapped buffer.
2009-04-22 09:03:17 +01:00
Brian Paul
c1a3b85280 st: play it safe for now and check _NEW_PROGRAM for shader const buffer atom
When a new program is bound but no constants are updated we still need
to update the Gallium const buffer.
2009-04-21 17:00:54 -06:00
Brian Paul
7872b8e37e swrast: simplify state update logic for fragment shader const buffers 2009-04-21 17:00:01 -06:00
Brian Paul
3eeefa47d0 st: use the static atoms[] array directly
We can simplify this now that we no longer have any dynamic atoms.
2009-04-21 16:50:34 -06:00
Brian Paul
f4f39902fd st: do away with dynamic state atom for const buffers
Just use the new _NEW_PROGRAM_CONSTANTS flag instead.
2009-04-21 16:47:30 -06:00
Brian Paul
64e331eb52 mesa: new _NEW_PROGRAM_CONSTANTS flag
This state flag will be used to indicate that vertex/fragment program
constants have changed.  _NEW_PROGRAM will be used to indicate changes
to the vertex/fragment shader itself, or misc related state.

_NEW_PROGRAM_CONSTANTS is also set whenever a program parameter that's
tracking GL state has changed.  For example, if the projection matrix is
in the parameter list, calling glFrustum() will cause _NEW_PROGRAM_CONSTANTS
to be set.  This will let to remove the need for dynamic state atoms in
some drivers.

For now, we still set _NEW_PROGRAM in all the places we used to.  We'll no
longer set _NEW_PROGRAM in glUniform() after drivers/etc have been updated.
2009-04-21 16:21:32 -06:00
Brian Paul
8a22e24fae mesa: print internal.current[i] attrib 2009-04-21 16:21:32 -06:00
Brian Paul
ac1fc3f465 mesa: print parameter list dirty state flag mask 2009-04-21 16:21:32 -06:00
Brian Paul
08e7f09f34 i965: const correctness 2009-04-21 16:21:32 -06:00
Michel Dänzer
6bd4bc785e Update GALLIUM_AUXILIARY_DIRS in configure.ac to match configs/default. 2009-04-21 18:32:42 +01:00
Maciej Cencora
584303ac8e r300: r300 hw doesn't support any input modifiers in tex insts 2009-04-21 12:14:35 -04:00
Mathias Gottschlag
b8fff1f9f1 r300-gallium: Fix CS size mismatch
This fixes some warnings which appear because the driver assumes a wrong
cs size (13 vs 16 register writes in some cases).
2009-04-21 09:52:30 -06:00
Brian Paul
dad1c1be18 demos: check that GL version is 2.0 or higher 2009-04-21 07:27:27 -06:00
Brian Paul
25e3a53403 st: report GL_OUT_OF_MEMORY instead of asserting 2009-04-21 07:27:26 -06:00
Keith Whitwell
e20f837f67 trivial/tri-viewport: add keys for frustrum/ortho and z coordinate 2009-04-21 11:40:59 +01:00
Keith Whitwell
6e05224bc4 trivial/tri-viewport: add more out-of-bounds background quads 2009-04-21 11:13:16 +01:00
Keith Whitwell
a38f7d9e68 trivial/tri_viewport: add space==reset key 2009-04-21 11:13:15 +01:00
Keith Whitwell
6bfcffa79e trivial/tri_viewport: add width/height keys 2009-04-21 11:13:15 +01:00
Brian Paul
d27d79db4a softpipe: fix softpipe_is_buffer/texture_referenced() regression
Return the conservative PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE
value for now.

This fixes a bunch of regressions seen in piglit and glean.
2009-04-20 14:57:00 -06:00
Brian Paul
5d5db81076 swrast: fix pointer arithmetic error in get_texel_array()
This came from commit 1b2ab02367
2009-04-20 14:15:04 -06:00
José Fonseca
29280ac69e gdi: Don't implement broken gl_dispatch_stub_xxx. 2009-04-20 16:44:37 +01:00
José Fonseca
be6037d459 wgl: Don't implement broken gl_dispatch_stub_xxx.
These don't respect the stdcall, so they crash upon return.
2009-04-20 16:44:37 +01:00
José Fonseca
708218119b mesa: Correct the gl_dispatch_stub_xxx prototypes. 2009-04-20 16:44:37 +01:00
José Fonseca
01397a66c7 mesa: Handle failure to create a transfer. 2009-04-20 16:44:36 +01:00
Keith Whitwell
d017749b3e mesa/progs: fix scons build after recent demo moves 2009-04-20 16:17:50 +01:00
Keith Whitwell
c691f96e98 trivial/tri-viewport.c - add guide lines, more triangles, make interactive
This is becoming more like a test than a trivial/ example.
2009-04-20 16:12:11 +01:00
Keith Whitwell
53c6467aea st: assert on pipe_buffer_create failure
This needs a proper fix to propogate the out-of-memory condition back
up to Mesa and the app as a GL error.  Until then, at least catch the
problem at its source.
2009-04-20 16:12:11 +01:00
Keith Whitwell
70588fc83c tests/mipmap_view: add linear/nearest key 2009-04-20 16:12:11 +01:00
Keith Whitwell
c7c76ba561 util: don't set unused blend state
Try to avoid creating multiple blend atoms.
2009-04-20 16:12:11 +01:00
Jakob Bornecrantz
8ae52413c7 trace: Add initializer for static variables 2009-04-20 16:07:44 +02:00
Maciej Cencora
6900046aad r300: fix register-negate branch merge regression 2009-04-20 07:31:44 -06:00
Michel Dänzer
c76a2444a3 gallium: Fix glDraw/CopyPixels fragment program leak. 2009-04-20 13:05:18 +02:00
Jakob Bornecrantz
f2d2b3d8e2 trace: Enable dumping to be turned on and off 2009-04-19 16:24:41 +01:00