Commit graph

29289 commits

Author SHA1 Message Date
Brian Paul
63191bd244 xmesa: pass pixmap to clip_for_xgetimage()
The code was assuming ctx->DrawBuffer == ctx->ReadBuffer.
Passing the pixmap is simpler and better.
Fixes a potential segfault.
2009-11-05 16:48:52 -07:00
Keith Whitwell
c93d9c1ce3 i965g: clean up winsys dumping code a little 2009-11-05 22:51:34 +00:00
Keith Whitwell
4c196ed7a8 i965g: pass relocation information in an array with bo_subdata
Makes it easier to dump as we get all of the information
about the upload in a single hit.

Opens the window to simplification in the driver if these
relocation arrays can be maintained statically rather than
being recreated whenever we check for a new upload.

Still needs some cleanup to avoid uglyness introduced with the
delta values.
2009-11-05 22:43:36 +00:00
Keith Whitwell
3763457892 i965g: propogate map-buffer-range semantics down to winsys 2009-11-05 21:09:51 +00:00
Keith Whitwell
963728665a i965g: make the winsys responsible for all buffer->offset handling
The winsys now inserts the presumed offset into referring buffers from
inside of bo_emit_reloc().  Remove the many locally coded places where
this was happening in the driver and eliminate the worry of getting it
wrong.

No longer need to expose offset values to the driver at all, so no need
to worry about what to do in the driver when they change.  Just use
zero values wherever we had offsets previously -- the relocations will
fix it all up for us.
2009-11-05 20:34:27 +00:00
Brian Paul
d971069fc6 mesa: fix infinite loop bug in _mesa_drawbuffers()
Fixes bug 24946.
This regression came from 8df699b3bb.
2009-11-05 13:17:21 -07:00
Keith Whitwell
658da189b6 i965g: remove duplicate viewport state in brw_context 2009-11-05 19:58:02 +00:00
Keith Whitwell
8f0e51be47 i965g: correct sense of writedisable flags 2009-11-05 19:57:59 +00:00
Keith Whitwell
b229ee342f brw: push more dumping into the winsys 2009-11-05 19:57:28 +00:00
José Fonseca
67034b9efc softpipe: Implement PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE for destination.
It is a valid and tested combination on D3D9.
2009-11-05 19:44:07 +00:00
Keith Whitwell
a70e6178d4 i965g: correct size of surf_bo array 2009-11-05 17:42:38 +00:00
Keith Whitwell
205871c76a i965g: use Elements in loops over arrays 2009-11-05 17:42:13 +00:00
Keith Whitwell
674c390aaf i965g: add const qualifiers 2009-11-05 17:41:35 +00:00
Keith Whitwell
aa9773d056 i965g: disassemble more than one instruction at a time 2009-11-05 15:34:18 +00:00
Keith Whitwell
203adb8ea6 i965g: remove old dumping code 2009-11-05 15:15:04 +00:00
Keith Whitwell
61a8ab3359 i965g: call dissassembler for appropriate data uploads 2009-11-05 15:10:22 +00:00
Keith Whitwell
c796aed5dd i965g: add lots of error checks and early returns
Any allocation that may fail should be checked, and propogate the
error upwards.  At the highest level we will flush batch and retry.

This is an alternate strategy to what the original DRI driver did of
attempting to flush batch from the lowest levels (eg inside
BEGIN_BATCH).  The trouble with that strategy was that flushes could
occur at unexpected times, and additionally there was a need for a
wierd notification mechanism to propogate the 'lost context' state
back up to higher levels.

Propogating the errors directly gives us a lot of flexibility how to
deal with these states, at the expense of a lot more checking in the
code.

Will add some sanity checks later to make sure that out-of-memory
conditions are properly escalated and not lost halfway up the stack.
2009-11-05 14:01:37 +00:00
José Fonseca
31b8b1dd36 i965g: Don't dump pads or dwords aliases. 2009-11-05 12:45:23 +00:00
Keith Whitwell
09454f68e5 i965g: hook up dumpers in dumping winsys 2009-11-05 12:35:22 +00:00
José Fonseca
9069c791d0 i965g: Dumper for i965 structures. 2009-11-05 12:22:01 +00:00
Keith Whitwell
6ac38232ee i965g: add data type tags to aid dumping/decoding 2009-11-05 10:59:02 +00:00
Cooper Yuan
e0590159ce g3dvl: remove a debug line 2009-11-05 16:06:01 +08:00
Keith Whitwell
b2bf5f98d9 i965g: use pipe_error return value for brw_batchbuffer_require_space
trivial/tri runs without crashing (on debug winsys) but still produces
obviously incorrect command buffers.
2009-11-05 08:01:48 +00:00
Keith Whitwell
2475e5db67 i965g: fix compiler warning 2009-11-05 08:00:33 +00:00
Cooper Yuan
c621c100b2 g3dvl: add scissor setting 2009-11-05 15:59:27 +08:00
Marek Olšák
c2e47191d7 r300g: add polygon mode
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák
4671005a43 r300g: fix the size of CS when emitting the fragprog constant buffer
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák
07190888bd r300g: set the correct offset in a colorbuffer surface
Suggested by Joakim Sindholt.

Also, put flushing of colorbuffers _before_ the framebuffer state setup,
suggested by docs.

Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Marek Olšák
ad96c0d851 r300g: add color channel masking
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com>
2009-11-04 18:19:34 -08:00
Jakob Bornecrantz
47cbbb7253 i965g: Builds with scons
But there are some missing symbols, "nm -u i965_dri.so"
[SNIP]
                 U brw_surface_bo
                 U brw_surface_pitch
                 U brw_texture_blanket_winsys_buffer
                 U brw_texture_get_winsys_buffer
                 U brw_update_dirty_counts
[SNIP]
2009-11-05 01:22:10 +00:00
Jakob Bornecrantz
643bb3419d i965g: Fix debug check 2009-11-05 01:22:10 +00:00
Jakob Bornecrantz
ce4f23aab9 i965g: Build with configure 2009-11-05 01:22:10 +00:00
Jakob Bornecrantz
37c6820d0d i965g: Do not create a symlink for i965_dri.so 2009-11-05 01:22:10 +00:00
Jakob Bornecrantz
9bc59a9b6d i915g: Do not create a symlink for i965_dri.so 2009-11-05 01:22:10 +00:00
Brian Paul
7c623905bc mesa: added cast to silence warning 2009-11-04 17:58:43 -07:00
Brian Paul
898de4a9d5 Merge branch 'mesa_7_6_branch'
Conflicts:

	src/mesa/drivers/windows/gdi/mesa.def
2009-11-04 17:57:20 -07:00
Brian Paul
1c3f7ab74c vbo: fix out-of-bounds array access
The exec->vtx.inputs[] array was being written past its end.  This was
clobbering the following vbo_exec_context::eval state.  Probably not noticed
since evaluators and immediate mode rendering don't happen at the same time.

Fixed the loop in vbo_exec_vtx_init().
Changed the size of the vbo_exec_context::vtx.arrays[] array.
Added a bunch of debug-build assertions.

Issue found by Vinson Lee.
2009-11-04 17:51:28 -07:00
Brian Paul
bc4ad7c2ae mesa: fix broken pack_histogram() case for GLhalf 2009-11-04 17:42:30 -07:00
Brian Paul
76aa0c0fd3 mesa: silence warning from gcc 4.4.1 2009-11-04 17:42:01 -07:00
Brian Paul
fe86f8d732 ARB prog parser: include variable name in error text 2009-11-04 17:27:49 -07:00
Keith Whitwell
ffc2446391 i965g: enable line stipple packet emit
With this change, trivial/tri manages to build and emit
a fairly unconvincing command buffer (to the debug winsys),
and then crashes.
2009-11-04 23:44:25 +00:00
Keith Whitwell
c2e51effe6 i965g: fix order of calculation of brw->wm.nr_surfaces 2009-11-04 23:41:30 +00:00
Keith Whitwell
220566d8dc i965g: consolidate some includes 2009-11-04 23:37:52 +00:00
Keith Whitwell
e84e86ecb2 i965g: fix some asserts 2009-11-04 23:33:08 +00:00
Keith Whitwell
7a49bd6d15 i965g: remove redundant screen pointer in brw context struct 2009-11-04 23:30:52 +00:00
Keith Whitwell
e3e084c660 i965g: initialize winsys pointer in surface cache 2009-11-04 23:27:50 +00:00
Keith Whitwell
518171a887 i965g: init pointer to null, avoid segfault 2009-11-04 23:27:30 +00:00
Keith Whitwell
bf4a518cf2 i965g: clean up wm init_registers func 2009-11-04 23:22:48 +00:00
Keith Whitwell
1b611f99b4 i965g: hook up some missing vertex shader code 2009-11-04 23:18:07 +00:00
Zack Rusin
4c5a758d06 st/xorg: these flushes shouldn't be necessary
performance optimization
2009-11-04 18:10:33 -05:00