profile/ivi/mesa.git
14 years agows/i965: respect DEBUG_WINSYS flag
Keith Whitwell [Mon, 21 Dec 2009 16:58:14 +0000 (16:58 +0000)]
ws/i965: respect DEBUG_WINSYS flag

14 years agoi965g: hook vertex state emit up to PIPE_NEW_VERTEX_BUFFER
Keith Whitwell [Mon, 21 Dec 2009 16:57:37 +0000 (16:57 +0000)]
i965g: hook vertex state emit up to PIPE_NEW_VERTEX_BUFFER

14 years agoi965g: keep refcounts to bound vertex buffers
Keith Whitwell [Mon, 21 Dec 2009 16:56:46 +0000 (16:56 +0000)]
i965g: keep refcounts to bound vertex buffers

14 years agoi965g: add DEBUG_WINSYS flag
Keith Whitwell [Mon, 21 Dec 2009 16:55:40 +0000 (16:55 +0000)]
i965g: add DEBUG_WINSYS flag

14 years agoi965g: remove duplicate set_viewport_state, fixes samples/depth
Keith Whitwell [Mon, 21 Dec 2009 15:38:08 +0000 (15:38 +0000)]
i965g: remove duplicate set_viewport_state, fixes samples/depth

14 years agoi965g: nasty hack for clearing y-tiled surfaces
Keith Whitwell [Tue, 1 Dec 2009 17:04:46 +0000 (17:04 +0000)]
i965g: nasty hack for clearing y-tiled surfaces

14 years agoi965g: add missing header
Keith Whitwell [Tue, 1 Dec 2009 16:39:02 +0000 (16:39 +0000)]
i965g: add missing header

14 years agoi965g: don't reference unused vars in RSQ
Keith Whitwell [Tue, 1 Dec 2009 16:32:33 +0000 (16:32 +0000)]
i965g: don't reference unused vars in RSQ

Probably overly pedantic

14 years agomesa/st: avoid quadstrips if its easy to do so
Keith Whitwell [Tue, 1 Dec 2009 16:31:21 +0000 (16:31 +0000)]
mesa/st: avoid quadstrips if its easy to do so

Tristrips are easier for many drivers to handle.

14 years agoi965g: turn on texture tiling by default
Keith Whitwell [Mon, 30 Nov 2009 16:16:30 +0000 (16:16 +0000)]
i965g: turn on texture tiling by default

14 years agoi965g: pass backbuffer tiling information to driver
Keith Whitwell [Mon, 30 Nov 2009 15:35:58 +0000 (15:35 +0000)]
i965g: pass backbuffer tiling information to driver

The gem winsys gets this information, needs to pass it on.

14 years agows/i965: more debug output
Keith Whitwell [Mon, 30 Nov 2009 14:58:30 +0000 (14:58 +0000)]
ws/i965: more debug output

14 years agows/i965: rename and change sense of I965_SEND_CMD to BRW_NO_HW
Keith Whitwell [Mon, 30 Nov 2009 14:20:33 +0000 (14:20 +0000)]
ws/i965: rename and change sense of I965_SEND_CMD to BRW_NO_HW

14 years agobrw: add dumping to gem winsys
Keith Whitwell [Mon, 30 Nov 2009 13:39:21 +0000 (13:39 +0000)]
brw: add dumping to gem winsys

14 years agoi965g: remove redundant nr_attrs member
Keith Whitwell [Wed, 25 Nov 2009 23:02:46 +0000 (23:02 +0000)]
i965g: remove redundant nr_attrs member

14 years agoi965g: remove surface from views list before freeing
Dave Airlie [Sun, 29 Nov 2009 08:59:19 +0000 (18:59 +1000)]
i965g: remove surface from views list before freeing

this fixes a crash with the xorg state tracker, however it then locks
up the GPU once rendering is enabled but at least it doesn't crash.

Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agoi965g: link xorg state tracker with -ldrm_intel
Dave Airlie [Sat, 28 Nov 2009 07:44:28 +0000 (17:44 +1000)]
i965g: link xorg state tracker with -ldrm_intel

14 years agoi965g: gs nr_attrs also tracks nr fragment shader inputs
Keith Whitwell [Mon, 23 Nov 2009 03:06:58 +0000 (03:06 +0000)]
i965g: gs nr_attrs also tracks nr fragment shader inputs

Or, equivalently, nr of outputs of active vertex shader varient.

14 years agoi965g: correct test for unfilled modes
Keith Whitwell [Mon, 23 Nov 2009 03:00:47 +0000 (03:00 +0000)]
i965g: correct test for unfilled modes

14 years agoi965g: use correct key size for vs upload
Keith Whitwell [Mon, 23 Nov 2009 01:47:57 +0000 (01:47 +0000)]
i965g: use correct key size for vs upload

14 years agoi965g: apply linear math to both linear and perspective attrs
Keith Whitwell [Mon, 23 Nov 2009 00:58:13 +0000 (00:58 +0000)]
i965g: apply linear math to both linear and perspective attrs

14 years agoi965g: get basic texturing working again
Keith Whitwell [Sat, 21 Nov 2009 01:52:22 +0000 (01:52 +0000)]
i965g: get basic texturing working again

Revert to fixed-layout surface binding table -- it's probably the best
way to do this.  Pass sampler and texture numbers separately even
though we're always keeping them the same at present.

14 years agoi965g: fix typo converting wm src regs
Keith Whitwell [Fri, 20 Nov 2009 04:40:41 +0000 (20:40 -0800)]
i965g: fix typo converting wm src regs

14 years agoi965g: fragment shader immediates working
Keith Whitwell [Fri, 20 Nov 2009 04:02:42 +0000 (20:02 -0800)]
i965g: fragment shader immediates working

14 years agoi965g: first pass at vs immediates in curbe
Keith Whitwell [Fri, 20 Nov 2009 03:51:04 +0000 (19:51 -0800)]
i965g: first pass at vs immediates in curbe

14 years agoprogs/vp: add param and imm test
Keith Whitwell [Fri, 20 Nov 2009 03:50:19 +0000 (19:50 -0800)]
progs/vp: add param and imm test

14 years agoi965g: get linear vs perspective interpolation working again
Keith Whitwell [Fri, 20 Nov 2009 03:41:25 +0000 (19:41 -0800)]
i965g: get linear vs perspective interpolation working again

14 years agoi965g: include interpolation info in fs signature
Keith Whitwell [Fri, 20 Nov 2009 03:31:32 +0000 (19:31 -0800)]
i965g: include interpolation info in fs signature

14 years agoi965g: special case setup when fs has no inputs
Keith Whitwell [Fri, 20 Nov 2009 03:15:21 +0000 (19:15 -0800)]
i965g: special case setup when fs has no inputs

14 years agoi965g: add new state flag tracking fs signature changes
Keith Whitwell [Fri, 20 Nov 2009 02:55:18 +0000 (18:55 -0800)]
i965g: add new state flag tracking fs signature changes

14 years agoi965g: fix typo in previous commit
Keith Whitwell [Fri, 20 Nov 2009 02:47:07 +0000 (18:47 -0800)]
i965g: fix typo in previous commit

14 years agoprogs/fp: add simple imm, param tests
Keith Whitwell [Fri, 20 Nov 2009 00:53:02 +0000 (16:53 -0800)]
progs/fp: add simple imm, param tests

14 years agoi965g: setup nr_attrs should track nr fragment shader inputs
Keith Whitwell [Fri, 20 Nov 2009 00:14:44 +0000 (16:14 -0800)]
i965g: setup nr_attrs should track nr fragment shader inputs

This would be equivalent to taking the nr outputs of the vp varient

14 years agoi965g: get fragment constants sort-of working
Keith Whitwell [Fri, 20 Nov 2009 00:09:39 +0000 (16:09 -0800)]
i965g: get fragment constants sort-of working

14 years agoi965g: make the load-before-use vs immediate path work
Keith Whitwell [Thu, 19 Nov 2009 23:04:00 +0000 (15:04 -0800)]
i965g: make the load-before-use vs immediate path work

14 years agoi965g: fix initialization of texture width/height/depth arrays
Keith Whitwell [Thu, 19 Nov 2009 22:47:24 +0000 (14:47 -0800)]
i965g: fix initialization of texture width/height/depth arrays

Will remove these arrays in another branch - they're completely redundant.

14 years agoi965g: remove more references to nr_vp_outputs in wm compilation
Keith Whitwell [Wed, 18 Nov 2009 22:40:43 +0000 (14:40 -0800)]
i965g: remove more references to nr_vp_outputs in wm compilation

We're really more concerned about how many inputs the fragment shader
is expecting.

14 years agoi965g: handle special vs outputs specially
Keith Whitwell [Tue, 17 Nov 2009 22:46:23 +0000 (14:46 -0800)]
i965g: handle special vs outputs specially

Where vs output semantic tags indicate an output is signficant for
fixed function processing (such as clipping, unfilled modes, etc),
retain information about that output so that we can get to it easily
later on.

Fix up the unfilled processing, but hard-wire edgeflag to one for now.

With this change, trivial/tri-unfilled works.

14 years agoi965g rename offset_edge to offset_edgeflag
Keith Whitwell [Sun, 15 Nov 2009 19:47:57 +0000 (11:47 -0800)]
i965g rename offset_edge to offset_edgeflag

14 years agoi965g: remove droppings in xlib winsys
Keith Whitwell [Sun, 15 Nov 2009 20:24:33 +0000 (12:24 -0800)]
i965g: remove droppings in xlib winsys

14 years agoi965g: restore check on line smooth state
Keith Whitwell [Sun, 15 Nov 2009 00:06:57 +0000 (16:06 -0800)]
i965g: restore check on line smooth state

14 years agoi965g: consult fs inputs when laying out vs output regs
Keith Whitwell [Wed, 11 Nov 2009 02:07:11 +0000 (18:07 -0800)]
i965g: consult fs inputs when laying out vs output regs

Vertex shader now emits just the FS inputs, in the positions and order
expected by the fragment shader.

This means potentially regenerating the vertex shader to match
different fragment shader's input layouts.

14 years agoi965g: skip over vertex position output when preallocating FS inputs
Keith Whitwell [Tue, 10 Nov 2009 02:04:58 +0000 (18:04 -0800)]
i965g: skip over vertex position output when preallocating FS inputs

14 years agoi965g: some more cases where file_max[] is used without obligatory +1
Keith Whitwell [Fri, 6 Nov 2009 23:34:33 +0000 (23:34 +0000)]
i965g: some more cases where file_max[] is used without obligatory +1

14 years agoi965g: smaller upload buffer for index data
Keith Whitwell [Fri, 6 Nov 2009 23:31:49 +0000 (23:31 +0000)]
i965g: smaller upload buffer for index data

14 years agoi965g: fix off-by-one on curbe upload
Keith Whitwell [Fri, 6 Nov 2009 23:29:47 +0000 (23:29 +0000)]
i965g: fix off-by-one on curbe upload

14 years agoi965g: avoid use of internally generated immediates
Keith Whitwell [Fri, 6 Nov 2009 21:17:08 +0000 (21:17 +0000)]
i965g: avoid use of internally generated immediates

Currently not working, so don't generate more of them.

14 years agotrivial: make tri-orig more closely match the original version of tri...
Keith Whitwell [Fri, 6 Nov 2009 20:46:27 +0000 (20:46 +0000)]
trivial: make tri-orig more closely match the original version of tri...

14 years agoi965g: Fixup texture formats
Jakob Bornecrantz [Sat, 7 Nov 2009 17:47:00 +0000 (17:47 +0000)]
i965g: Fixup texture formats

14 years agoi965g: Formalize on S8Z24 as the suported depth format
Jakob Bornecrantz [Sat, 7 Nov 2009 15:47:21 +0000 (15:47 +0000)]
i965g: Formalize on S8Z24 as the suported depth format

14 years agoi965g: Fixup buffer creation function
Jakob Bornecrantz [Fri, 6 Nov 2009 20:44:09 +0000 (20:44 +0000)]
i965g: Fixup buffer creation function

First tri!

14 years agoi965g: Add texture transfer functions
Jakob Bornecrantz [Fri, 6 Nov 2009 20:19:39 +0000 (20:19 +0000)]
i965g: Add texture transfer functions

They don't seem to work. Maybe we are forgetting to flush the gpu or something.

14 years agoi965g: Match pitch modification on get buffer as well
Jakob Bornecrantz [Fri, 6 Nov 2009 19:05:41 +0000 (19:05 +0000)]
i965g: Match pitch modification on get buffer as well

This is a ugly hack in order to match what the intel
X driver gives us. However putting this in the winsys
where it fits better forces it reach more into the
driver then it already does.

14 years agoprogs/trivial: Ignores
Jakob Bornecrantz [Fri, 6 Nov 2009 18:40:04 +0000 (18:40 +0000)]
progs/trivial: Ignores

14 years agoi965g: First clear!
Jakob Bornecrantz [Fri, 6 Nov 2009 18:34:23 +0000 (18:34 +0000)]
i965g: First clear!

14 years agoi965g: get rid of cc key, simplify state upload
Keith Whitwell [Fri, 6 Nov 2009 14:20:04 +0000 (14:20 +0000)]
i965g: get rid of cc key, simplify state upload

Keep a valid reloc table active between uploads, avoid
recalculating it every time.

14 years agoi965g: trivial/clear can now send stuff to hardware
Jakob Bornecrantz [Fri, 6 Nov 2009 16:41:58 +0000 (16:41 +0000)]
i965g: trivial/clear can now send stuff to hardware

Added a flag if we should send commands to hardware
as what we send isn't all that correct.

14 years agoi965g: Fix texture blanket function
Jakob Bornecrantz [Fri, 6 Nov 2009 16:40:54 +0000 (16:40 +0000)]
i965g: Fix texture blanket function

14 years agoi965g: Add functions needed by the winsys
Jakob Bornecrantz [Fri, 6 Nov 2009 15:54:27 +0000 (15:54 +0000)]
i965g: Add functions needed by the winsys

14 years agoi965g: Winsys whitespace
Jakob Bornecrantz [Fri, 6 Nov 2009 00:15:01 +0000 (00:15 +0000)]
i965g: Winsys whitespace

14 years agoi965g: Build winsys again
Jakob Bornecrantz [Fri, 6 Nov 2009 00:09:28 +0000 (00:09 +0000)]
i965g: Build winsys again

14 years agoi965g: Header whitespace
Jakob Bornecrantz [Fri, 6 Nov 2009 00:09:04 +0000 (00:09 +0000)]
i965g: Header whitespace

14 years agoi965g: get brw_state_debug.c building
Keith Whitwell [Fri, 6 Nov 2009 15:40:16 +0000 (15:40 +0000)]
i965g: get brw_state_debug.c building

14 years agoi965g: propogate index size state
Keith Whitwell [Fri, 6 Nov 2009 14:18:28 +0000 (14:18 +0000)]
i965g: propogate index size state

14 years agoi965g: remove references to brw_surface_bo()
Keith Whitwell [Fri, 6 Nov 2009 13:41:52 +0000 (13:41 +0000)]
i965g: remove references to brw_surface_bo()

14 years agoi965g: plumb through fb_write target and eot data
Keith Whitwell [Fri, 6 Nov 2009 13:09:12 +0000 (13:09 +0000)]
i965g: plumb through fb_write target and eot data

14 years agoi965g: propogate nr_cbufs into wm prog key
Keith Whitwell [Fri, 6 Nov 2009 12:51:26 +0000 (12:51 +0000)]
i965g: propogate nr_cbufs into wm prog key

14 years agoi965g: init saturate field in fp dst_reg helper
Keith Whitwell [Fri, 6 Nov 2009 12:01:11 +0000 (12:01 +0000)]
i965g: init saturate field in fp dst_reg helper

14 years agoi965g: add dumping for our new pass_fp output
Keith Whitwell [Fri, 6 Nov 2009 11:56:52 +0000 (11:56 +0000)]
i965g: add dumping for our new pass_fp output

14 years agoi965g: disassemble each instruction as generated
Keith Whitwell [Fri, 6 Nov 2009 11:21:48 +0000 (11:21 +0000)]
i965g: disassemble each instruction as generated

14 years agoi965g: hardwire linear interpolation for now
Keith Whitwell [Fri, 6 Nov 2009 11:21:08 +0000 (11:21 +0000)]
i965g: hardwire linear interpolation for now

seems to generate saner code, need to go back and fix perspective
interpolation (and remove the hard-wire) once this is working.

14 years agoi965g: fix some reloc counts
Keith Whitwell [Fri, 6 Nov 2009 10:38:19 +0000 (10:38 +0000)]
i965g: fix some reloc counts

14 years agoi965g: don't set up vs stack register for non-branching shaders
Keith Whitwell [Fri, 6 Nov 2009 10:24:19 +0000 (10:24 +0000)]
i965g: don't set up vs stack register for non-branching shaders

14 years agoi965g: add DEBUG_MIN_URB flag
Keith Whitwell [Fri, 6 Nov 2009 10:19:39 +0000 (10:19 +0000)]
i965g: add DEBUG_MIN_URB flag

14 years agoi965g: tgsi outputs cannot be used as source regs
Keith Whitwell [Fri, 6 Nov 2009 10:19:24 +0000 (10:19 +0000)]
i965g: tgsi outputs cannot be used as source regs

14 years agoi965g: use curr.vertex_element state directly
Keith Whitwell [Fri, 6 Nov 2009 09:35:25 +0000 (09:35 +0000)]
i965g: use curr.vertex_element state directly

14 years agotrivial: add vbo-tri, an even simpler version of tri.c
Keith Whitwell [Fri, 6 Nov 2009 09:22:46 +0000 (09:22 +0000)]
trivial: add vbo-tri, an even simpler version of tri.c

14 years agoi965g: don't emit line stipple packet if stipple disabled
Keith Whitwell [Fri, 6 Nov 2009 08:57:40 +0000 (08:57 +0000)]
i965g: don't emit line stipple packet if stipple disabled

14 years agoi965g: populate brw_context chipset id
Keith Whitwell [Fri, 6 Nov 2009 08:57:02 +0000 (08:57 +0000)]
i965g: populate brw_context chipset id

14 years agoi965g: make sure blend color packet header is initialized
Keith Whitwell [Fri, 6 Nov 2009 08:54:01 +0000 (08:54 +0000)]
i965g: make sure blend color packet header is initialized

We will emit this packet at startup (dirty == ~0), even if we haven't
had the state tracker call into brw_set_blend_color() yet.

This way is a little more efficient also.

14 years agoi965g: remove/disable inactive state atoms
Keith Whitwell [Fri, 6 Nov 2009 08:33:10 +0000 (08:33 +0000)]
i965g: remove/disable inactive state atoms

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.