Commit graph

46233 commits

Author SHA1 Message Date
Eric Anholt
9367960ea6 i965/vs: Use write commits on scratch writes in pre-gen6.
This is required to ensure ordering between reads and writes within a
thread.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:57 -07:00
Eric Anholt
838bfe0c46 i965/vs: Fix setup of scratch space pointer on pre-gen6.
We were failing to relocate, so on the first draw run our scratch
would tend to get written to 0x0.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:54 -07:00
Eric Anholt
ddf8e602a7 i965/vs: Fix message setup for array read/writes on pre-gen6.
We were passing an MRF as the source argument, instead of using the
implied move and putting the MRF number in the proper place in the
instruction encoding.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:51 -07:00
Eric Anholt
88612e2c1b i965/vs: Fix constant-indexed array read/write addresses on pre-gen6.
The second vertex was getting a garbage index.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:48 -07:00
Eric Anholt
bba910373f i965/vs: Add support for vector comparison ops resulting in bool cond codes.
Fixes a giant pile of VS tests on gen4.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:43 -07:00
Eric Anholt
9f84288607 i965/vs: Make pre-gen6 math operate in vector mode instead of scalar.
On the old backend, we used scalar mode because Mesa IR math is
result.xyzw = math(op0.xxxx), which matched up well.  However, in GLSL
IR we do things like result.xy = math(op0.xy), so we want vector mode.
For the common case of result.x = math(op0.x), performance will be the
same (no cost for un-executed channels), though result.xyzw =
math(op0.xxxx) would be worse.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:23 -07:00
Eric Anholt
87be0ac96c i965/vs: Fix copy-and-paste disaster in pre-gen6 POW support.
Fixes vs-pow-float-float and friends.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:20 -07:00
Eric Anholt
2ffc5ac1da i965/vs: Fix gen4 comparisons used for predication.
When we tried to retype a brw_null_reg() in CMP(), the retyping didn't
take effect because HW_REG just ignores the type field.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:01:17 -07:00
Eric Anholt
8adcad213e i965/vs: Fix GPU hangs in shaders with large virtual GRFs pre-gen6.
If you get your total GRF count wrong, you write over some other
shader's g0, and the GPU fails shortly thereafter.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 18:00:57 -07:00
Brian Paul
23eec54bb0 i965: add casts to silence int/enum conversion warnings 2011-09-06 16:50:27 -06:00
Stéphane Marchesin
02f1b50987 state_trackers/dri/sw: Implement texture_from_pixmap.
Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2011-09-06 15:03:01 -07:00
Stéphane Marchesin
569bde1fa7 Duplicate state_tracker/dri/sw/dri_drawable.c
We need this for the upcoming fix for sw texture_from_pixmap.

Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2011-09-06 15:03:00 -07:00
nobled
55e763c86d Enable GLX_EXT_texture_from_pixmap in software.
Signed-off-by: nobled <nobled@dreamwidth.org>
Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2011-09-06 15:03:00 -07:00
Brian Paul
a4adc88a2d st/mesa: remove unneeded #include 2011-09-06 15:44:44 -06:00
Brian Paul
1a65d098ce mesa: whitespace fixes, just to be consistent 2011-09-06 15:31:26 -06:00
Brian Paul
51e7b05875 mesa: put _mesa_ prefix on vert_result_to_frag_attrib() 2011-09-06 15:29:24 -06:00
Brian Paul
a794ad3709 mesa: fix vert_result_to_frag_attrib() parameter type 2011-09-06 15:24:14 -06:00
Brian Paul
37afceeee9 mesa: s/inline/INLINE/ to fix MSVC build 2011-09-06 15:20:33 -06:00
Adam Jackson
7826067bd1 Drop some Glide remnants
Apparently the x11 driver had a hack for glide passthrough.  Who knew?

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-09-06 16:23:50 -04:00
Adam Jackson
7f379df401 Remove an AmiWin leftover
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-09-06 16:23:50 -04:00
Adam Jackson
c7cc61fea9 Remove dead glfbdev.h
This belonged to the now-dead swrast-on-fbdev driver.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-09-06 16:23:50 -04:00
Adam Jackson
f6f2f59818 Drop documentation references for deleted backends
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-09-06 16:23:50 -04:00
José Fonseca
f4dd099171 rtasm,translate: Disable on Mingw-w64.
Causes crash and stack corruption.

Needs more investigation. Disable for now.
2011-09-06 20:40:44 +01:00
Ian Romanick
5812b24845 docs: skeleton file for 7.12 release notes
Current just the items that have been removed from Mesa are mentioned
in the release notes.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:36 -07:00
Ian Romanick
3602fbb201 mesa: Remove support for unpacking from client memory to color-index pixels
Mesa hasn't supported color-index rendering for a long time.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:32 -07:00
Ian Romanick
d7cb905a5a swrast: Use GL_STENCIL_INDEX for address calculations
GL_COLOR_INDEX produced the same result (because GL_BITMAP is always
used for stencil glDrawPixels), but it was confusing to read.  I spent
about 15 minutes wondering, "WTF?"

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:28 -07:00
Ian Romanick
e174b5d483 mesa: Remove GL_COLOR_INDEX from _mesa_{dest,source}_buffer_exists
Mesa hasn't supported color-index rendering for a long time.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:24 -07:00
Ian Romanick
559241d48c mesa: Remove GL_COLOR_INDEX from base format assertions
_mesa_make_temp_float_image can't work on color-index textures, but
there is no such thing as a color-index texture anymore.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:20 -07:00
Ian Romanick
ede7d9fff5 swrast: Remove GL_COLOR_INDEX from assertions
These sampling functions don't work on color-index textures, but there
is no such thing as a color-index texture anymore.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:16 -07:00
Ian Romanick
960f37a57a mesa: Remove unused struct gl_color_table
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:12 -07:00
Ian Romanick
81a6cf9ddf mesa: Remove unused functions _mesa_lookup_rgba_{float,ubyte}
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:09 -07:00
Ian Romanick
0b6dd75058 mesa: Remove all mention of GL_COLOR_INDEX*_EXT
These enums were only valid with the paletted texture extensions.
This allows a couple other trivial clean-ups.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:05 -07:00
Ian Romanick
eb805a5182 mesa: Remove dd_function_table::CopyColorTable, ::CopyColorSubTable, and ::UpdateTexturePalette
There's nothing left that can call any of these functions.  This also
removes the meta-ops code that implemented the first two.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:09:00 -07:00
Ian Romanick
eba527bf9f mesa: Remove API facing bits of EXT_paletted_texture and EXT_shared_texture_palette
This was also discussed at XDS 2010.  However, actually making the
change was delayed because several drivers still exposed these
extensions to significant benefit (e.g., tdfx).  Now that those
drivers have been removed, this code can be removed as well.

v2: A lot of bits that were missed in the previous patch have been removed.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-09-06 12:08:25 -07:00
Paul Berry
becd54eedb i965: Remove two_side_color from brw_compute_vue_map().
Since we now lay out the VUE the same way regardless of whether
two-sided color is enabled, brw_compute_vue_map() no longer needs to
know whether two-sided color is enabled.  This allows the two-sided
color flag to be removed from the clip, GS, and VS keys, so that fewer
GPU programs need to be recompiled when turning two-sided color on and
off.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:48 -07:00
Paul Berry
f2b09257ba i965: For GEN6+, always make front/back colors adjacent in VUE.
When doing two-sided color on GEN6+, we use the SF unit's
INPUTATTR_FACING mode to cause front colors to be used on front-facing
triangles, and back colors to be used on back-facing triangles.  This
mode requires that the front and back colors be adjacent in the VUE.

Previously, we would only place front and back colors adjacent in the
VUE when two-sided color was enabled.  Now we place them adjacent in
the VUE whether two-sided color is enabled or not.  (We still only
swizzle the colors when two-sided color is enabled, so there should be
no user-visible change).

This simplifies the implementation of the VUE map and reduces the
amount of code that is dependent on two-sided color mode.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:44 -07:00
Paul Berry
18dcda2dcf i965: GS: Use the VUE map to compute URB size.
The previous computation had two bugs: (a) it used a formula based on
Gen5 for Gen6 and Gen7 as well. (b) it failed to account for the fact
that PSIZ is stored in the VUE header.  Fortunately, both bugs caused
it to compute a URB size that was too large, which was benign.  This
patch computes the URB size directly from the VUE map, so it gets the
result correct in all circumstances.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:41 -07:00
Paul Berry
78be5bcb22 i965: clip: Remove no-longer-needed variables.
The variables offset[], idx_to_attr[], nr_bytes, nr_attrs, and
header_regs were all serving purposes which are now served by the VUE
map.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:38 -07:00
Paul Berry
4efb32c642 i965: clip: Remove assumption about VUE header from brw_clip_interp_vertex()
Previously, brw_clip_interp_vertex() iterated only through the
"non-header" elements of the VUE when performing interpolation
(because header elements don't need interpolation).  This code now
refers exclusively to the VUE map to figure out which elements need
interpolation, so that brw_clip_interp_vertex() doesn't need to know
the header size.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:34 -07:00
Paul Berry
71cb82f63a i965: clip: Change computation of nr_regs to use VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:31 -07:00
Paul Berry
2ef1fa6b3c i965: clip: Convert computations to ..._to_offset() for clarity.
This patch replaces some ad-hoc computations using ATTR_SIZE and the
offset[] array to use the VUE map functions
brw_vert_result_to_offset() and brw_vue_slot_to_offset().

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:28 -07:00
Paul Berry
54a62f8806 i965: clip: Add a function to determine whether a vert_result is in use.
Previously we would examine the offset[] array (since an offset of 0
meant "not in use").  This paves the way for removing the offset[]
array.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:25 -07:00
Paul Berry
620f06b126 i965: clip: Rework brw_clip_interp_vertex() to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:23 -07:00
Paul Berry
c46be4273c i965: clip: Modify brw_clip_interp_vertex() to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:20 -07:00
Paul Berry
5a93019a87 i965: clip: Move header_regs into brw_clip_compile.
This makes header_regs available for computing VUE offsets within clip code.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:17 -07:00
Paul Berry
2bc421845e i965: clip: Modify brw_clip_tri_alloc_regs() to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:14 -07:00
Paul Berry
62b0c8561e i965: clip: Move hpos_offest and ndc_offset into local functions.
The offsets within the VUE of HPOS and NDC are needed only in a few
auxiliary clipping functions.  This patch moves computation of those
offsets into the functions that need them, and does the computation
using the VUE map.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:11 -07:00
Paul Berry
eae5b5c44e i965: clip: rename header_position_offset to the more correct ndc_offset.
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:08 -07:00
Paul Berry
514eeca32c i965: clip: Add VUE map computation to clip stage for Gen4-5.
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:05 -07:00
Paul Berry
9660e3b788 i965: SF: Change gen{6,7}_sf_state.c to compute URB read length based on VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-09-06 11:05:03 -07:00