profile/ivi/mesa.git
14 years agoi965g: populate wm reloc array earlier
Keith Whitwell [Fri, 6 Nov 2009 08:29:09 +0000 (08:29 +0000)]
i965g: populate wm reloc array earlier

Still have to calculate the reloc background in two places.

14 years agoi965g: point_rast_rule comment no longer applies
Keith Whitwell [Fri, 6 Nov 2009 08:28:17 +0000 (08:28 +0000)]
i965g: point_rast_rule comment no longer applies

Not sure exactly what state we want here now, will need to experiment.

14 years agoi965g: scissor off by one
Keith Whitwell [Fri, 6 Nov 2009 08:27:43 +0000 (08:27 +0000)]
i965g: scissor off by one

14 years agoi965g: restore code to populate the relocation background
Keith Whitwell [Fri, 6 Nov 2009 07:47:07 +0000 (07:47 +0000)]
i965g: restore code to populate the relocation background

I'm emitting this in two places now, to the data presented
for upload and also in the delta field of the reloc struct.
Probably want to remove the delta field and just pull the
background from the key.

14 years agoi965g: clean up winsys dumping code a little
Keith Whitwell [Thu, 5 Nov 2009 22:51:34 +0000 (22:51 +0000)]
i965g: clean up winsys dumping code a little

14 years agoi965g: pass relocation information in an array with bo_subdata
Keith Whitwell [Thu, 5 Nov 2009 22:43:36 +0000 (22:43 +0000)]
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.

14 years agoi965g: propogate map-buffer-range semantics down to winsys
Keith Whitwell [Thu, 5 Nov 2009 21:09:51 +0000 (21:09 +0000)]
i965g: propogate map-buffer-range semantics down to winsys

14 years agoi965g: make the winsys responsible for all buffer->offset handling
Keith Whitwell [Thu, 5 Nov 2009 20:34:27 +0000 (20:34 +0000)]
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.

14 years agoi965g: remove duplicate viewport state in brw_context
Keith Whitwell [Thu, 5 Nov 2009 19:58:02 +0000 (19:58 +0000)]
i965g: remove duplicate viewport state in brw_context

14 years agoi965g: correct sense of writedisable flags
Keith Whitwell [Thu, 5 Nov 2009 19:57:59 +0000 (19:57 +0000)]
i965g: correct sense of writedisable flags

14 years agobrw: push more dumping into the winsys
Keith Whitwell [Thu, 5 Nov 2009 17:43:57 +0000 (17:43 +0000)]
brw: push more dumping into the winsys

14 years agoi965g: correct size of surf_bo array
Keith Whitwell [Thu, 5 Nov 2009 17:42:38 +0000 (17:42 +0000)]
i965g: correct size of surf_bo array

14 years agoi965g: use Elements in loops over arrays
Keith Whitwell [Thu, 5 Nov 2009 17:42:13 +0000 (17:42 +0000)]
i965g: use Elements in loops over arrays

14 years agoi965g: add const qualifiers
Keith Whitwell [Thu, 5 Nov 2009 17:41:35 +0000 (17:41 +0000)]
i965g: add const qualifiers

14 years agoi965g: disassemble more than one instruction at a time
Keith Whitwell [Thu, 5 Nov 2009 15:34:18 +0000 (15:34 +0000)]
i965g: disassemble more than one instruction at a time

14 years agoi965g: remove old dumping code
Keith Whitwell [Thu, 5 Nov 2009 15:15:04 +0000 (15:15 +0000)]
i965g: remove old dumping code

14 years agoi965g: call dissassembler for appropriate data uploads
Keith Whitwell [Thu, 5 Nov 2009 15:10:22 +0000 (15:10 +0000)]
i965g: call dissassembler for appropriate data uploads

14 years agoi965g: add lots of error checks and early returns
Keith Whitwell [Thu, 5 Nov 2009 13:57:05 +0000 (13:57 +0000)]
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.

14 years agoi965g: Don't dump pads or dwords aliases.
José Fonseca [Thu, 5 Nov 2009 12:44:36 +0000 (12:44 +0000)]
i965g: Don't dump pads or dwords aliases.

14 years agoi965g: hook up dumpers in dumping winsys
Keith Whitwell [Thu, 5 Nov 2009 12:35:22 +0000 (12:35 +0000)]
i965g: hook up dumpers in dumping winsys

14 years agoi965g: Dumper for i965 structures.
José Fonseca [Thu, 5 Nov 2009 12:22:01 +0000 (12:22 +0000)]
i965g: Dumper for i965 structures.

14 years agoi965g: add data type tags to aid dumping/decoding
Keith Whitwell [Thu, 5 Nov 2009 10:59:02 +0000 (10:59 +0000)]
i965g: add data type tags to aid dumping/decoding

14 years agoi965g: use pipe_error return value for brw_batchbuffer_require_space
Keith Whitwell [Thu, 5 Nov 2009 08:01:48 +0000 (08:01 +0000)]
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.

14 years agoi965g: fix compiler warning
Keith Whitwell [Thu, 5 Nov 2009 08:00:33 +0000 (08:00 +0000)]
i965g: fix compiler warning

14 years agoi965g: Builds with scons
Jakob Bornecrantz [Thu, 5 Nov 2009 00:42:30 +0000 (00:42 +0000)]
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]

14 years agoi965g: Fix debug check
Jakob Bornecrantz [Thu, 5 Nov 2009 00:38:51 +0000 (00:38 +0000)]
i965g: Fix debug check

14 years agoi965g: Build with configure
Jakob Bornecrantz [Wed, 4 Nov 2009 23:02:13 +0000 (23:02 +0000)]
i965g: Build with configure

14 years agoi965g: Do not create a symlink for i965_dri.so
Jakob Bornecrantz [Wed, 4 Nov 2009 23:02:04 +0000 (23:02 +0000)]
i965g: Do not create a symlink for i965_dri.so

14 years agoi915g: Do not create a symlink for i965_dri.so
Jakob Bornecrantz [Wed, 4 Nov 2009 23:01:24 +0000 (23:01 +0000)]
i915g: Do not create a symlink for i965_dri.so

14 years agoi965g: enable line stipple packet emit
Keith Whitwell [Wed, 4 Nov 2009 23:44:16 +0000 (23:44 +0000)]
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.

14 years agoi965g: fix order of calculation of brw->wm.nr_surfaces
Keith Whitwell [Wed, 4 Nov 2009 23:41:30 +0000 (23:41 +0000)]
i965g: fix order of calculation of brw->wm.nr_surfaces

14 years agoi965g: consolidate some includes
Keith Whitwell [Wed, 4 Nov 2009 23:37:52 +0000 (23:37 +0000)]
i965g: consolidate some includes

14 years agoi965g: fix some asserts
Keith Whitwell [Wed, 4 Nov 2009 23:33:08 +0000 (23:33 +0000)]
i965g: fix some asserts

14 years agoi965g: remove redundant screen pointer in brw context struct
Keith Whitwell [Wed, 4 Nov 2009 23:30:52 +0000 (23:30 +0000)]
i965g: remove redundant screen pointer in brw context struct

14 years agoi965g: initialize winsys pointer in surface cache
Keith Whitwell [Wed, 4 Nov 2009 23:27:50 +0000 (23:27 +0000)]
i965g: initialize winsys pointer in surface cache

14 years agoi965g: init pointer to null, avoid segfault
Keith Whitwell [Wed, 4 Nov 2009 23:27:30 +0000 (23:27 +0000)]
i965g: init pointer to null, avoid segfault

14 years agoi965g: clean up wm init_registers func
Keith Whitwell [Wed, 4 Nov 2009 23:22:48 +0000 (23:22 +0000)]
i965g: clean up wm init_registers func

14 years agoi965g: hook up some missing vertex shader code
Keith Whitwell [Wed, 4 Nov 2009 23:18:07 +0000 (23:18 +0000)]
i965g: hook up some missing vertex shader code

14 years agoi965g: hook up some vertex state funcs
Keith Whitwell [Wed, 4 Nov 2009 23:09:23 +0000 (23:09 +0000)]
i965g: hook up some vertex state funcs

14 years agows/i965: allow NULL buffer in winsys::bo_unreference
Keith Whitwell [Wed, 4 Nov 2009 23:09:05 +0000 (23:09 +0000)]
ws/i965: allow NULL buffer in winsys::bo_unreference

Special case to avoid clutter in the driver

14 years agoi965g: pull in a copy of intel_decode.c for now
Keith Whitwell [Wed, 4 Nov 2009 21:35:29 +0000 (21:35 +0000)]
i965g: pull in a copy of intel_decode.c for now

With the stubbed out, non-hardware xlib winsys, trivial/clear runs and
prints a plausible command stream

14 years agoi965g: hook up flush-frontbuffer
Keith Whitwell [Wed, 4 Nov 2009 21:12:48 +0000 (21:12 +0000)]
i965g: hook up flush-frontbuffer

14 years agoi965g: fix up batchbuffer confusion
Keith Whitwell [Wed, 4 Nov 2009 21:05:34 +0000 (21:05 +0000)]
i965g: fix up batchbuffer confusion

14 years agoi965g: plumb in some surface state
Keith Whitwell [Wed, 4 Nov 2009 20:36:48 +0000 (20:36 +0000)]
i965g: plumb in some surface state

14 years agoi965g: hook up pipe_clear functions
Keith Whitwell [Wed, 4 Nov 2009 20:26:41 +0000 (20:26 +0000)]
i965g: hook up pipe_clear functions

14 years agoi965g: add constant buffer setter
Keith Whitwell [Wed, 4 Nov 2009 19:41:02 +0000 (19:41 +0000)]
i965g: add constant buffer setter

14 years agoi965g: add missing is_*_referenced callbacks
Keith Whitwell [Wed, 4 Nov 2009 19:32:44 +0000 (19:32 +0000)]
i965g: add missing is_*_referenced callbacks

14 years agoi965g: initialize surface refcount
Keith Whitwell [Wed, 4 Nov 2009 19:03:06 +0000 (19:03 +0000)]
i965g: initialize surface refcount

14 years agoi965g: add more missing pipe callbacks
Keith Whitwell [Wed, 4 Nov 2009 18:26:34 +0000 (18:26 +0000)]
i965g: add more missing pipe callbacks

14 years agoi965g: add some missing texture creation code
Keith Whitwell [Wed, 4 Nov 2009 16:42:44 +0000 (16:42 +0000)]
i965g: add some missing texture creation code

14 years agoi965g: stubs for brw_pipe_vertex.c
Keith Whitwell [Wed, 4 Nov 2009 16:03:52 +0000 (16:03 +0000)]
i965g: stubs for brw_pipe_vertex.c

14 years agoi965g: hook up pipe sampler callbacks
Keith Whitwell [Wed, 4 Nov 2009 15:59:56 +0000 (15:59 +0000)]
i965g: hook up pipe sampler callbacks

14 years agoi965g: hook up more pipe_context functions
Keith Whitwell [Wed, 4 Nov 2009 15:25:42 +0000 (15:25 +0000)]
i965g: hook up more pipe_context functions

14 years agoi965g: add missing buffer functions
Keith Whitwell [Wed, 4 Nov 2009 15:10:34 +0000 (15:10 +0000)]
i965g: add missing buffer functions

14 years agows/i965: add load-time driver registration
Keith Whitwell [Wed, 4 Nov 2009 14:03:25 +0000 (14:03 +0000)]
ws/i965: add load-time driver registration

Otherwise xlib state-tracker doesn't know about us.

14 years agows/i965: add butt-ugly linker hack
Keith Whitwell [Wed, 4 Nov 2009 13:59:59 +0000 (13:59 +0000)]
ws/i965: add butt-ugly linker hack

Need more linker magic to keep the glX symbols externally visible even
though they started off in a .a file.

14 years agoi965g: hook up brw_screen.c
Keith Whitwell [Wed, 4 Nov 2009 13:54:44 +0000 (13:54 +0000)]
i965g: hook up brw_screen.c

14 years agoi965g: add standalone xlib debug winsys
Keith Whitwell [Wed, 4 Nov 2009 13:03:35 +0000 (13:03 +0000)]
i965g: add standalone xlib debug winsys

Create a dummy winsys that just debug-prints on calls into the winsys
functions.  Will use this to get to the point where we are generating
sane-looking debug dumps and diassembly.

Also fix various warnings generated with the new compiler flags set in
this config.

14 years agoi965g: convert read/write domain pairs into single usage value
Keith Whitwell [Tue, 3 Nov 2009 23:16:02 +0000 (23:16 +0000)]
i965g: convert read/write domain pairs into single usage value

Easier to understand what's going on in the driver sources, convert
stereotype usage values back to GEM read/write domain flags in the
winsys.

14 years agoi965g: format RELOCs similarly
Keith Whitwell [Mon, 2 Nov 2009 08:49:02 +0000 (08:49 +0000)]
i965g: format RELOCs similarly

14 years agoi965g: rename brw_constant_buffer to brw_curbe_buffer
Keith Whitwell [Mon, 2 Nov 2009 08:48:26 +0000 (08:48 +0000)]
i965g: rename brw_constant_buffer to brw_curbe_buffer

Now that there are real constant buffers, try to reduce naming confusion.

14 years agoi965g: driver and winsys compile
Keith Whitwell [Sun, 1 Nov 2009 19:30:53 +0000 (19:30 +0000)]
i965g: driver and winsys compile

A milestone of sorts.  Still a long way from something working --
the old one compiled too, at least some of the time...

14 years agoi965g: the whole drivers/i965 directory is compiling
Keith Whitwell [Sun, 1 Nov 2009 17:55:16 +0000 (17:55 +0000)]
i965g: the whole drivers/i965 directory is compiling

That was a lot more work than I expected.  Still the winsys to go,
then the small matter of making it work and re-enabling the
missing functionality.

14 years agoi965g: more files compiling
Keith Whitwell [Sun, 1 Nov 2009 17:18:56 +0000 (17:18 +0000)]
i965g: more files compiling

14 years agoi965g: more files compiling
Keith Whitwell [Sun, 1 Nov 2009 15:59:21 +0000 (15:59 +0000)]
i965g: more files compiling

14 years agoi965g: more files compiling
Keith Whitwell [Sun, 1 Nov 2009 14:32:50 +0000 (14:32 +0000)]
i965g: more files compiling

14 years agoi965g: more files compiling
Keith Whitwell [Sun, 1 Nov 2009 13:11:56 +0000 (13:11 +0000)]
i965g: more files compiling

14 years agoi965g: more work on compilation -- surface management
Keith Whitwell [Sun, 1 Nov 2009 12:08:14 +0000 (12:08 +0000)]
i965g: more work on compilation -- surface management

14 years agoi965g: more work on compilation
Keith Whitwell [Sat, 31 Oct 2009 20:05:19 +0000 (20:05 +0000)]
i965g: more work on compilation

14 years agoi965g: non-glsl fragment shader path is compiling
Keith Whitwell [Sat, 31 Oct 2009 18:23:14 +0000 (18:23 +0000)]
i965g: non-glsl fragment shader path is compiling

Disabled glsl code for now, probably want to clean this up somehow.

14 years agoi965g: wip on fragment shaders
Keith Whitwell [Sat, 31 Oct 2009 15:05:01 +0000 (15:05 +0000)]
i965g: wip on fragment shaders

14 years agoi965g: work in progress on fragment shaders
Keith Whitwell [Thu, 29 Oct 2009 20:18:01 +0000 (20:18 +0000)]
i965g: work in progress on fragment shaders

14 years agoi965g: still working on compilation
Keith Whitwell [Wed, 28 Oct 2009 21:24:03 +0000 (21:24 +0000)]
i965g: still working on compilation

14 years agoi965g: still working on compilation
Keith Whitwell [Tue, 27 Oct 2009 00:29:21 +0000 (00:29 +0000)]
i965g: still working on compilation

14 years agoi965g: still working on compilation
Keith Whitwell [Mon, 26 Oct 2009 01:11:36 +0000 (01:11 +0000)]
i965g: still working on compilation

14 years agoi965g: still working on compilation
Keith Whitwell [Mon, 26 Oct 2009 00:20:33 +0000 (00:20 +0000)]
i965g: still working on compilation

14 years agoi965g: start hooking up some to the gallium context interfaces
Keith Whitwell [Sun, 25 Oct 2009 11:36:22 +0000 (11:36 +0000)]
i965g: start hooking up some to the gallium context interfaces

- create/bind/destroy blend and depth state
- framebuffer and viewport
- etc.

14 years agoi965g: more compiling wip
Keith Whitwell [Sun, 25 Oct 2009 00:20:56 +0000 (01:20 +0100)]
i965g: more compiling wip

14 years agoi965g: more work on compiling, particularly the brw_draw files
Keith Whitwell [Sat, 24 Oct 2009 23:02:16 +0000 (00:02 +0100)]
i965g: more work on compiling, particularly the brw_draw files

14 years agoi965g: more work on compiling
Keith Whitwell [Sat, 24 Oct 2009 16:07:01 +0000 (17:07 +0100)]
i965g: more work on compiling

14 years agoi965g: more files compiling
Keith Whitwell [Sat, 24 Oct 2009 12:18:34 +0000 (13:18 +0100)]
i965g: more files compiling

14 years agoi965g: hook into build system
Keith Whitwell [Sat, 24 Oct 2009 10:55:25 +0000 (11:55 +0100)]
i965g: hook into build system

14 years agows/i965: renames from i915, hook up makefiles
Keith Whitwell [Sat, 24 Oct 2009 10:55:05 +0000 (11:55 +0100)]
ws/i965: renames from i915, hook up makefiles

14 years agoi965g: first compiling file
Keith Whitwell [Sat, 24 Oct 2009 10:53:43 +0000 (11:53 +0100)]
i965g: first compiling file

14 years agows/i965: pull in the rest of the i915 winsys tree.
Keith Whitwell [Fri, 23 Oct 2009 22:37:45 +0000 (23:37 +0100)]
ws/i965: pull in the rest of the i915 winsys tree.

The intel_xorg file looks like it's got quite a bit of code that could
be lifted up into the xorg state tracker -- should really just have a
list of pci ids and a pointer to a screen create func.

14 years agows/i965: clone the i915 winsys
Keith Whitwell [Fri, 23 Oct 2009 22:36:02 +0000 (23:36 +0100)]
ws/i965: clone the i915 winsys

I'll want to rework this, not sure trying to share this code is a very
good idea at least until the interfaces from the two drivers calm
down.

14 years agoi965g: wip on removing GL stuff, trying to get a few files compiling
Keith Whitwell [Fri, 23 Oct 2009 22:27:43 +0000 (23:27 +0100)]
i965g: wip on removing GL stuff, trying to get a few files compiling

14 years agoi965: ignore cliprect_mode
Keith Whitwell [Fri, 23 Oct 2009 19:19:14 +0000 (20:19 +0100)]
i965: ignore cliprect_mode

14 years agoi965g: wip
Keith Whitwell [Fri, 23 Oct 2009 16:01:32 +0000 (17:01 +0100)]
i965g: wip

14 years agoi965g: re-starting from the dri driver
Keith Whitwell [Fri, 23 Oct 2009 15:55:02 +0000 (16:55 +0100)]
i965g: re-starting from the dri driver

14 years agogallium: remove extended negate also, and also the ExtSwz token
Keith Whitwell [Fri, 23 Oct 2009 13:50:02 +0000 (14:50 +0100)]
gallium: remove extended negate also, and also the ExtSwz token

Likewise, the extended negate functionality hasn't been
used since mesa switched to using tgsi_ureg to build programs,
and has been translating the SWZ opcode internally to a single MAD.

14 years agocell: typo from ExtSwizzle commit
Keith Whitwell [Fri, 23 Oct 2009 13:38:30 +0000 (14:38 +0100)]
cell: typo from ExtSwizzle commit

14 years agogallium: remove the swizzling parts of ExtSwizzle
Keith Whitwell [Fri, 23 Oct 2009 13:31:24 +0000 (14:31 +0100)]
gallium: remove the swizzling parts of ExtSwizzle

These haven't been used by the mesa state tracker since the
conversion to tgsi_ureg, and it seems that none of the
other state trackers are using it either.

This helps simplify one of the biggest suprises when starting off with
TGSI shaders.

14 years agogallium: remove noise opcodes
Keith Whitwell [Fri, 23 Oct 2009 12:49:04 +0000 (13:49 +0100)]
gallium: remove noise opcodes

Provide a dummy implementation in the GL state tracker (move 0.5 to
the destination regs).

At some point, a motivated person could add a better
implementation of noise.  Currently not even the nvidia
binary drivers do anything more than this.  In any case, the
place to do this is in the GL state tracker, not the poor
driver.

14 years agoprogs/demos: add fps to multiarb
Keith Whitwell [Sat, 26 Sep 2009 07:39:57 +0000 (08:39 +0100)]
progs/demos: add fps to multiarb

14 years agor300g: last changes's typo, miss a include file
Cooper Yuan [Fri, 23 Oct 2009 08:40:31 +0000 (16:40 +0800)]
r300g: last changes's typo, miss a include file

14 years agor300g: add flush_frontbuffer function to display video surface
Cooper Yuan [Fri, 23 Oct 2009 06:46:29 +0000 (14:46 +0800)]
r300g: add flush_frontbuffer function to display video surface

14 years agog3dvl: pass display and screen to g3dvl when creating video private context
Cooper Yuan [Fri, 23 Oct 2009 06:44:27 +0000 (14:44 +0800)]
g3dvl: pass display and screen to g3dvl when creating video private context

14 years agor600: remove remains of old tnl pipeline
Alex Deucher [Fri, 23 Oct 2009 05:00:23 +0000 (01:00 -0400)]
r600: remove remains of old tnl pipeline

14 years agor600: fix render size prediction
Alex Deucher [Fri, 23 Oct 2009 04:40:41 +0000 (00:40 -0400)]
r600: fix render size prediction