Keith Whitwell
34a01929d5
i965g: special case setup when fs has no inputs
2009-11-19 19:29:33 -08:00
Keith Whitwell
47cef2bb8f
i965g: add new state flag tracking fs signature changes
2009-11-19 18:55:18 -08:00
Keith Whitwell
c58e20fbbb
i965g: fix typo in previous commit
2009-11-19 18:47:07 -08:00
Keith Whitwell
8db59a1fa3
i965g: setup nr_attrs should track nr fragment shader inputs
...
This would be equivalent to taking the nr outputs of the vp varient
2009-11-19 16:14:44 -08:00
Keith Whitwell
1b9eda4c74
i965g: get fragment constants sort-of working
2009-11-19 16:09:39 -08:00
Keith Whitwell
9e4f3eaf66
i965g: make the load-before-use vs immediate path work
2009-11-19 15:04:00 -08:00
Keith Whitwell
25cbf9b4da
i965g: fix initialization of texture width/height/depth arrays
...
Will remove these arrays in another branch - they're completely redundant.
2009-11-19 14:47:24 -08:00
Keith Whitwell
6b1ede0110
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.
2009-11-18 14:40:43 -08:00
Keith Whitwell
1877e6cd2d
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.
2009-11-17 14:50:49 -08:00
Keith Whitwell
d299ee771b
i965g rename offset_edge to offset_edgeflag
2009-11-17 14:50:49 -08:00
Keith Whitwell
d03a1c2216
i965g: restore check on line smooth state
2009-11-14 16:06:57 -08:00
Keith Whitwell
2f54d02d20
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.
2009-11-11 18:51:58 -08:00
Keith Whitwell
0c547d63c4
i965g: skip over vertex position output when preallocating FS inputs
2009-11-11 18:51:57 -08:00
Keith Whitwell
a010307e0a
i965g: some more cases where file_max[] is used without obligatory +1
2009-11-11 18:51:57 -08:00
Keith Whitwell
e4d174ea1b
i965g: smaller upload buffer for index data
2009-11-11 18:51:57 -08:00
Keith Whitwell
d86e9079a8
i965g: fix off-by-one on curbe upload
2009-11-11 18:51:57 -08:00
Keith Whitwell
e243279a48
i965g: avoid use of internally generated immediates
...
Currently not working, so don't generate more of them.
2009-11-11 18:51:57 -08:00
Jakob Bornecrantz
cbad97b685
i965g: Fixup texture formats
2009-11-07 17:47:00 +00:00
Jakob Bornecrantz
229f6b9a7e
i965g: Formalize on S8Z24 as the suported depth format
2009-11-07 15:47:21 +00:00
Jakob Bornecrantz
9708ce874e
i965g: Add texture transfer functions
...
They don't seem to work. Maybe we are forgetting to flush the gpu or something.
2009-11-06 20:45:08 +00:00
Jakob Bornecrantz
dc97a5d782
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.
2009-11-06 19:05:41 +00:00
Jakob Bornecrantz
833f5bbfaf
i965g: First clear!
2009-11-06 18:34:23 +00:00
Keith Whitwell
4fbe6c4e4e
i965g: get rid of cc key, simplify state upload
...
Keep a valid reloc table active between uploads, avoid
recalculating it every time.
2009-11-06 17:26:52 +00:00
Jakob Bornecrantz
2eb6b0defe
i965g: Fix texture blanket function
2009-11-06 16:40:54 +00:00
Jakob Bornecrantz
215b49ae1e
i965g: Add functions needed by the winsys
2009-11-06 15:55:06 +00:00
Jakob Bornecrantz
12ea198fd2
i965g: Header whitespace
2009-11-06 15:55:06 +00:00
Keith Whitwell
86c32df3e0
i965g: get brw_state_debug.c building
2009-11-06 15:40:16 +00:00
Keith Whitwell
4d1ae7a546
i965g: propogate index size state
2009-11-06 14:18:28 +00:00
Keith Whitwell
11805726d3
i965g: remove references to brw_surface_bo()
2009-11-06 13:41:52 +00:00
Keith Whitwell
eacd13bcc8
i965g: plumb through fb_write target and eot data
2009-11-06 13:28:04 +00:00
Keith Whitwell
3e14a482da
i965g: propogate nr_cbufs into wm prog key
2009-11-06 12:51:26 +00:00
Keith Whitwell
1e3910a878
i965g: init saturate field in fp dst_reg helper
2009-11-06 12:01:11 +00:00
Keith Whitwell
a485341455
i965g: add dumping for our new pass_fp output
2009-11-06 11:56:52 +00:00
Keith Whitwell
381cd2d63f
i965g: disassemble each instruction as generated
2009-11-06 11:45:01 +00:00
Keith Whitwell
aab9601a75
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.
2009-11-06 11:21:08 +00:00
Keith Whitwell
caf2cf884c
i965g: fix some reloc counts
2009-11-06 10:38:19 +00:00
Keith Whitwell
212fb8adbd
i965g: don't set up vs stack register for non-branching shaders
2009-11-06 10:24:19 +00:00
Keith Whitwell
1d6b5957c6
i965g: add DEBUG_MIN_URB flag
2009-11-06 10:19:39 +00:00
Keith Whitwell
5d7c0cf563
i965g: tgsi outputs cannot be used as source regs
2009-11-06 10:19:24 +00:00
Keith Whitwell
b216f1aa47
i965g: use curr.vertex_element state directly
2009-11-06 09:38:14 +00:00
Keith Whitwell
c22b47ebb1
i965g: don't emit line stipple packet if stipple disabled
2009-11-06 08:57:40 +00:00
Keith Whitwell
fc7fa678f5
i965g: populate brw_context chipset id
2009-11-06 08:57:02 +00:00
Keith Whitwell
0e80e4ea75
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.
2009-11-06 08:54:01 +00:00
Keith Whitwell
018e2250b8
i965g: remove/disable inactive state atoms
2009-11-06 08:33:10 +00:00
Keith Whitwell
4a3e24522b
i965g: populate wm reloc array earlier
...
Still have to calculate the reloc background in two places.
2009-11-06 08:29:09 +00:00
Keith Whitwell
b8e63e9210
i965g: point_rast_rule comment no longer applies
...
Not sure exactly what state we want here now, will need to experiment.
2009-11-06 08:28:17 +00:00
Keith Whitwell
b9bb41321a
i965g: scissor off by one
2009-11-06 08:27:43 +00:00
Keith Whitwell
a49ccf0fd2
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.
2009-11-06 07:47:07 +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
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
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
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
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
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
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
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
Keith Whitwell
cc8105d740
i965g: hook up some vertex state funcs
2009-11-04 23:09:23 +00:00
Keith Whitwell
951fdac566
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
2009-11-04 21:37:07 +00:00
Keith Whitwell
b8bb48f452
i965g: fix up batchbuffer confusion
2009-11-04 21:05:34 +00:00
Keith Whitwell
c5ed7b6e76
i965g: plumb in some surface state
2009-11-04 20:36:48 +00:00
Keith Whitwell
e18f223da7
i965g: hook up pipe_clear functions
2009-11-04 20:26:41 +00:00
Keith Whitwell
19119517ce
i965g: add constant buffer setter
2009-11-04 19:41:02 +00:00
Keith Whitwell
4e335a213a
i965g: add missing is_*_referenced callbacks
2009-11-04 19:32:44 +00:00
Keith Whitwell
0cf432c7a1
i965g: initialize surface refcount
2009-11-04 19:03:06 +00:00
Keith Whitwell
58e3360c11
i965g: add more missing pipe callbacks
2009-11-04 18:26:34 +00:00
Keith Whitwell
99394a737a
i965g: add some missing texture creation code
2009-11-04 16:42:44 +00:00
Keith Whitwell
5f8dde99ed
i965g: stubs for brw_pipe_vertex.c
2009-11-04 16:03:52 +00:00
Keith Whitwell
7373bc0e02
i965g: hook up pipe sampler callbacks
2009-11-04 15:59:56 +00:00
Keith Whitwell
9706a83bc9
i965g: hook up more pipe_context functions
2009-11-04 15:25:42 +00:00
Keith Whitwell
a09b3d5097
i965g: add missing buffer functions
2009-11-04 15:10:34 +00:00
Keith Whitwell
b1d2933214
i965g: hook up brw_screen.c
2009-11-04 13:54:44 +00:00
Keith Whitwell
211d7ab22b
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.
2009-11-04 13:03:35 +00:00
Keith Whitwell
a277bb20de
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.
2009-11-04 10:09:39 +00:00
Keith Whitwell
4ea94c04c9
i965g: format RELOCs similarly
2009-11-02 08:50:16 +00:00
Keith Whitwell
23c2ba8280
i965g: rename brw_constant_buffer to brw_curbe_buffer
...
Now that there are real constant buffers, try to reduce naming confusion.
2009-11-02 08:48:26 +00:00
Keith Whitwell
15a8ac2c9d
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...
2009-11-01 19:30:53 +00:00
Keith Whitwell
efda453d64
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.
2009-11-01 17:55:16 +00:00
Keith Whitwell
4a3e002cf9
i965g: more files compiling
2009-11-01 17:18:56 +00:00
Keith Whitwell
6981bbfabe
i965g: more files compiling
2009-11-01 15:59:21 +00:00
Keith Whitwell
15e7a3b8bb
i965g: more files compiling
2009-11-01 14:33:01 +00:00