Eric Anholt [Wed, 7 Sep 2011 18:53:20 +0000 (11:53 -0700)]
glsl: When assiging from a whole array, mark it as used.
Fixes piglit link-uniform-array-size.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 7 Sep 2011 18:00:03 +0000 (11:00 -0700)]
glsl: Fix setting of OutputsWritten for whole array dereference.
We just want to mark the whole thing used, not mark from each element
the whole size in use. Fixes undefined URB entry writes on i965,
which blew up with debugging enabled.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Fri, 9 Sep 2011 02:54:37 +0000 (20:54 -0600)]
mesa: remove unneeded #include of texfetch.h
Brian Paul [Fri, 9 Sep 2011 02:16:18 +0000 (20:16 -0600)]
mesa: use _mesa_unpack_float_z_row in get_tex_depth()
Removes another use of the gl_texture_image::FetchTexelf() function.
Brian Paul [Fri, 9 Sep 2011 02:16:18 +0000 (20:16 -0600)]
mesa: use ctx->Driver.GetTexImage() to decompress base texture image
This is a simple way to do the job and it removes one more use of
the soon-to-be-removed gl_texture_image::FetchTexelc() function.
Brian Paul [Fri, 9 Sep 2011 02:16:18 +0000 (20:16 -0600)]
mesa: handle compressed images in get_tex_rgba()
Uses the new _mesa_decompress_image() function. Unlike the meta path
that uses textured quad rendering to do decompression, this works with
signed formats as well.
Brian Paul [Fri, 9 Sep 2011 02:16:18 +0000 (20:16 -0600)]
mesa: new _mesa_decompress_image() function
Use the old texture fetch functions to decompress a whole image.
To be used by glGetTexImage().
Brian Paul [Fri, 9 Sep 2011 02:16:18 +0000 (20:16 -0600)]
mesa: added _mesa_get_uncompressed_format(), _mesa_format_num_components()
Brian Paul [Fri, 9 Sep 2011 02:16:18 +0000 (20:16 -0600)]
mesa: add new pixel format unpacking code
This will be used instead of the texel fetch code to unpack images
in various formats.
Brian Paul [Fri, 9 Sep 2011 02:16:18 +0000 (20:16 -0600)]
meta: added _mesa_meta_GetTexImage()
If the texture is compressed, call the meta decompress_texture_image()
function. Otherwise, call the core _mesa_get_teximage() function.
Brian Paul [Fri, 9 Sep 2011 02:16:18 +0000 (20:16 -0600)]
meta: move texcoord setup into setup_texture_coords()
Marcin Slusarz [Tue, 6 Sep 2011 14:12:52 +0000 (16:12 +0200)]
nouveau: fix nouveau_fence leak
Note: This is a candidate for the 7.11 branch.
Marcin Slusarz [Sat, 27 Aug 2011 23:05:22 +0000 (01:05 +0200)]
nv50: fix screen->blitctx memory leak
Adam Jackson [Thu, 8 Sep 2011 17:34:53 +0000 (13:34 -0400)]
gles: Fix glGet(GL_{NUM_,}COMPRESSED_TEXTURE_FORMATS_ARB)
We'd still accept the GL_PALETTE[48]_* formats in glCompressedTexImage2D,
but they wouldn't be listed if you queried whether they were supported.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Paul Berry [Fri, 12 Aug 2011 01:10:22 +0000 (18:10 -0700)]
glsl: Make sure gl_ClipDistance and gl_ClipVertex are not both written.
From section 7.1 (Vertex Shader Special Variables) of the GLSL 1.30
spec:
"It is an error for a shader to statically write both
gl_ClipVertex and gl_ClipDistance."
Fixes piglit test mixing-clip-distance-and-clip-vertex-disallowed.c.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Thu, 11 Aug 2011 22:23:33 +0000 (15:23 -0700)]
glsl: Check that gl_ClipDistance[] is not sized too large.
Fixes piglit tests
clip-distance-explicit-too-large-with-access.{frag,vert} and
clip-distance-explicit-too-large.{frag,vert}.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Tue, 6 Sep 2011 17:01:51 +0000 (10:01 -0700)]
glsl: Rework oversize array check for gl_TexCoord.
The check now applies both when explicitly declaring the size of
gl_TexCoord and when implicitly setting the size of gl_TexCoord by
accessing it using integral constant expressions.
This is prep work for adding similar size checks to gl_ClipDistance.
Fixes piglit tests texcoord/implicit-access-max.{frag,vert}.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Fri, 12 Aug 2011 00:33:06 +0000 (17:33 -0700)]
glsl: Add constant gl_MaxClipDistances.
Fixes piglit tests {vs,fs}-clip-distance-sizeable-to-max.shader_test.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Thu, 11 Aug 2011 22:03:19 +0000 (15:03 -0700)]
glsl: Make gl_ClipDistance[] implicitly sized.
From the GLSL 1.30 spec, section 7.1 (Vertex Shader Special Variables):
The gl_ClipDistance array is predeclared as unsized and must be
sized by the shader either redeclaring it with a size or indexing it
only with integral constant expressions.
Fixes piglit tests clip-distance-implicit-length.vert,
clip-distance-implicit-nonconst-access.vert, and
{vs,fs}-clip-distance-explicitly-sized.shader_test.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
José Fonseca [Thu, 8 Sep 2011 08:59:01 +0000 (09:59 +0100)]
scons: Use -g instead of -g3.
-g3 causes binaries to be 3x - 10x bigger, not only on MinGW w/ dwarf
debugging info, but linux as well.
Stick with -g, (which defaults to -g2), like autoconf does.
José Fonseca [Thu, 8 Sep 2011 08:32:10 +0000 (09:32 +0100)]
st/egl: Fix GDI build.
José Fonseca [Wed, 7 Sep 2011 17:42:07 +0000 (18:42 +0100)]
Define INLINE macro in terms of inline.
Benjamin Franzke [Thu, 8 Sep 2011 06:01:46 +0000 (08:01 +0200)]
st/egl: add premultiplied alpha support to wayland
Return true for NATIVE_PARAM_PREMULTIPLIED_ALPHA when all formats with
alpha support premultiplied alpha.
(Based on Chia-I Wu's patch)
[olv: remove the use of param_premultiplied_alpha from the original
patch]
Benjamin Franzke [Thu, 8 Sep 2011 06:03:34 +0000 (08:03 +0200)]
st/egl: correctly return configs under wayland
Handle "format" events and return configs for the supported formats.
(Based on Chia-I Wu's patch)
[olv: update and explain why PIPE_FORMAT_B8G8R8A8_UNORM should not be
enabled without HAS_ARGB32]
Chia-I Wu [Thu, 8 Sep 2011 08:05:32 +0000 (16:05 +0800)]
Revert "st/egl: correctly return configs under wayland"
This reverts commit
95b445699d7f049116ee0927387a958a9933766b.
Chia-I Wu [Thu, 8 Sep 2011 08:05:22 +0000 (16:05 +0800)]
Revert "st/egl: add premultiplied alpha support to wayland"
This reverts commit
23aa978a9d76a48f4b93e9a8911ec50c0e5d94ab.
Chia-I Wu [Wed, 7 Sep 2011 19:00:31 +0000 (03:00 +0800)]
st/egl: add premultiplied alpha support to wayland
Return true for NATIVE_PARAM_PREMULTIPLIED_ALPHA when all formats with
alpha support premultiplied alpha. Currently, it means when argb32 and
argb32_pre are both supported.
Chia-I Wu [Wed, 7 Sep 2011 18:29:55 +0000 (02:29 +0800)]
st/egl: correctly return configs under wayland
When wl_drm is avaiable and enabled, handle "format" events and return
configs for the supported formats. Otherwise, assume all formats of
wl_shm are supported.
Chia-I Wu [Wed, 7 Sep 2011 18:39:01 +0000 (02:39 +0800)]
st/egl: overload NATIVE_PARAM_PREMULTIPLIED_ALPHA
EGL does not export this capability of a display server. But wayland
makes use of EGL_VG_ALPHA_FORMAT to achieve it.
So, when the native display returns true for the parameter, st/egl will
set EGL_VG_ALPHA_FORMAT_PRE_BIT for all EGLConfig's with non-zero
EGL_ALPHA_SIZE. EGL_VG_ALPHA_FORMAT attribute of a surface will affect
how the surface is presented.
Because st/vega does not support EGL_VG_ALPHA_FORMAT_PRE_BIT,
EGL_OPENVG_BIT will be cleared.
Chia-I Wu [Wed, 7 Sep 2011 17:39:27 +0000 (01:39 +0800)]
st/egl: add NATIVE_PARAM_PREMULTIPLIED_ALPHA
Return TRUE if the display supports premultiplied alpha.
Chia-I Wu [Fri, 2 Sep 2011 13:26:24 +0000 (21:26 +0800)]
st/egl: add native_present_control
Replace the parameters of native_surface::present by a struct,
native_present_control. Using a struct allows us to add more control
options without having to update each backend every time.
Brian Paul [Wed, 7 Sep 2011 17:44:35 +0000 (11:44 -0600)]
glsl: s/int/unsigned/ to silence warning
Stéphane Marchesin [Wed, 7 Sep 2011 19:06:30 +0000 (12:06 -0700)]
st/mesa: Remove unused renderbuffer fields and functions.
Reviewed-by: Brian Paul <brianp@vmware.com>
Kenneth Graunke [Fri, 2 Sep 2011 17:50:40 +0000 (10:50 -0700)]
i965/fs: Implement ir_u2f opcode.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sat, 3 Sep 2011 19:39:16 +0000 (12:39 -0700)]
i965: Fix disassembly for intdiv/intmod math functions.
The opcodes and strings were reversed. Quotient means division, and
modulus means remainder.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Chia-I Wu [Wed, 7 Sep 2011 13:41:30 +0000 (21:41 +0800)]
st/egl: track changes to drop wl_visual in wayland
Follow a subset of changes in
7b1d94e5d1f53ac5f59000176aea1d02fc9a1181.
There are known issues, but it works to a certain degree. Non-working
demos also fail gracefully. More importantly, it fixes the build.
Chia-I Wu [Wed, 7 Sep 2011 13:42:56 +0000 (21:42 +0800)]
st/egl: track server side wayland changes
Follow changes in
c661ecce1089000c3fca9a543713f8264221be50.
Chia-I Wu [Wed, 7 Sep 2011 13:40:41 +0000 (21:40 +0800)]
st/egl: use new wl_callback mechanism in wayland
Follow the changes in
6602bda23ba6c4351eb7f04d34803103a68ac2db.
Kenneth Graunke [Mon, 15 Aug 2011 19:04:37 +0000 (12:04 -0700)]
i965: Use proper texture alignment units for cubemaps on Gen5+.
In particular, S3TC compressed textures need align_h == 4.
Fixes skybox errors in Quake 4 and FEAR.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34628
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Mon, 5 Sep 2011 19:03:29 +0000 (12:03 -0700)]
glsl/ir_reader: Make sure constants have the right number of components.
The list of numbers in (constant type (<numbers>)) needs to contain
exactly type->components() numbers (16 for a mat4, 3 for a vec3, etc.)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 5 Sep 2011 19:12:10 +0000 (12:12 -0700)]
glsl/builtins: Fix invalid float constant in noise4 built-in.
Throwing away the extra numbers ought to match the existing behavior.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 5 Sep 2011 19:20:18 +0000 (12:20 -0700)]
glsl/builtins: Fix invalid vecN constants in hyperbolic functions.
Each of these vecN constants only provided one component, which is
illegal. The printed IR is meant to contain exactly as many components
as are necessary; the IR reader does not splat single values.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Dave Airlie [Wed, 7 Sep 2011 09:19:14 +0000 (10:19 +0100)]
varray.c: fix logic around BGRA with ARB_vertex_type_2_10_10_10_rev.
I introduced a regression in here, I've just split the logic ot now, so
its easier to read/understand.
Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=40664
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vinson Lee [Wed, 7 Sep 2011 04:43:51 +0000 (21:43 -0700)]
mesa/vbo: s/inline/INLINE/
MSVC does not support inline keyword.
Eric Anholt [Tue, 30 Aug 2011 22:34:43 +0000 (15:34 -0700)]
i965/vs: Fix point size handling on gen4.
Fixes glsl-vs-point-size.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 31 Aug 2011 00:56:33 +0000 (17:56 -0700)]
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>
Eric Anholt [Tue, 30 Aug 2011 23:58:03 +0000 (16:58 -0700)]
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>
Eric Anholt [Tue, 30 Aug 2011 23:47:43 +0000 (16:47 -0700)]
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>
Eric Anholt [Tue, 30 Aug 2011 23:40:06 +0000 (16:40 -0700)]
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>
Eric Anholt [Tue, 30 Aug 2011 23:23:44 +0000 (16:23 -0700)]
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>
Eric Anholt [Tue, 30 Aug 2011 22:59:26 +0000 (15:59 -0700)]
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>
Eric Anholt [Fri, 2 Sep 2011 23:58:30 +0000 (16:58 -0700)]
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>
Eric Anholt [Fri, 2 Sep 2011 23:46:46 +0000 (16:46 -0700)]
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>
Eric Anholt [Tue, 30 Aug 2011 22:50:17 +0000 (15:50 -0700)]
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>
Brian Paul [Tue, 6 Sep 2011 22:50:27 +0000 (16:50 -0600)]
i965: add casts to silence int/enum conversion warnings
Stéphane Marchesin [Tue, 30 Aug 2011 00:22:03 +0000 (17:22 -0700)]
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>
Stéphane Marchesin [Tue, 30 Aug 2011 00:19:29 +0000 (17:19 -0700)]
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>
nobled [Mon, 29 Aug 2011 23:24:59 +0000 (16:24 -0700)]
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>
Brian Paul [Tue, 6 Sep 2011 21:44:44 +0000 (15:44 -0600)]
st/mesa: remove unneeded #include
Brian Paul [Tue, 6 Sep 2011 21:30:14 +0000 (15:30 -0600)]
mesa: whitespace fixes, just to be consistent
Brian Paul [Tue, 6 Sep 2011 21:29:24 +0000 (15:29 -0600)]
mesa: put _mesa_ prefix on vert_result_to_frag_attrib()
Brian Paul [Tue, 6 Sep 2011 21:24:14 +0000 (15:24 -0600)]
mesa: fix vert_result_to_frag_attrib() parameter type
Brian Paul [Tue, 6 Sep 2011 21:20:33 +0000 (15:20 -0600)]
mesa: s/inline/INLINE/ to fix MSVC build
Adam Jackson [Tue, 6 Sep 2011 19:58:00 +0000 (15:58 -0400)]
Drop some Glide remnants
Apparently the x11 driver had a hack for glide passthrough. Who knew?
Signed-off-by: Adam Jackson <ajax@redhat.com>
Adam Jackson [Tue, 6 Sep 2011 19:55:11 +0000 (15:55 -0400)]
Remove an AmiWin leftover
Signed-off-by: Adam Jackson <ajax@redhat.com>
Adam Jackson [Tue, 6 Sep 2011 19:50:11 +0000 (15:50 -0400)]
Remove dead glfbdev.h
This belonged to the now-dead swrast-on-fbdev driver.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Adam Jackson [Wed, 29 Jun 2011 14:48:43 +0000 (10:48 -0400)]
Drop documentation references for deleted backends
Signed-off-by: Adam Jackson <ajax@redhat.com>
José Fonseca [Tue, 6 Sep 2011 19:40:21 +0000 (20:40 +0100)]
rtasm,translate: Disable on Mingw-w64.
Causes crash and stack corruption.
Needs more investigation. Disable for now.
Ian Romanick [Wed, 31 Aug 2011 20:20:00 +0000 (13:20 -0700)]
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>
Ian Romanick [Mon, 29 Aug 2011 21:33:51 +0000 (14:33 -0700)]
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>
Ian Romanick [Mon, 29 Aug 2011 21:06:00 +0000 (14:06 -0700)]
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>
Ian Romanick [Mon, 29 Aug 2011 20:59:49 +0000 (13:59 -0700)]
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>
Ian Romanick [Mon, 29 Aug 2011 20:34:52 +0000 (13:34 -0700)]
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>
Ian Romanick [Mon, 29 Aug 2011 20:30:46 +0000 (13:30 -0700)]
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>
Ian Romanick [Mon, 29 Aug 2011 18:39:20 +0000 (11:39 -0700)]
mesa: Remove unused struct gl_color_table
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 29 Aug 2011 18:38:55 +0000 (11:38 -0700)]
mesa: Remove unused functions _mesa_lookup_rgba_{float,ubyte}
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 29 Aug 2011 16:49:04 +0000 (09:49 -0700)]
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>
Ian Romanick [Mon, 29 Aug 2011 16:38:09 +0000 (09:38 -0700)]
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>
Ian Romanick [Mon, 29 Aug 2011 16:37:24 +0000 (09:37 -0700)]
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>
Paul Berry [Sat, 3 Sep 2011 15:42:28 +0000 (08:42 -0700)]
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>
Paul Berry [Sat, 3 Sep 2011 15:23:27 +0000 (08:23 -0700)]
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>
Paul Berry [Tue, 30 Aug 2011 17:54:14 +0000 (10:54 -0700)]
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>
Paul Berry [Fri, 26 Aug 2011 16:30:35 +0000 (09:30 -0700)]
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>
Paul Berry [Fri, 26 Aug 2011 19:17:56 +0000 (12:17 -0700)]
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>
Paul Berry [Fri, 26 Aug 2011 19:08:43 +0000 (12:08 -0700)]
i965: clip: Change computation of nr_regs to use VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Wed, 31 Aug 2011 22:34:01 +0000 (15:34 -0700)]
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>
Paul Berry [Thu, 25 Aug 2011 20:27:57 +0000 (13:27 -0700)]
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>
Paul Berry [Thu, 25 Aug 2011 18:14:47 +0000 (11:14 -0700)]
i965: clip: Rework brw_clip_interp_vertex() to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 25 Aug 2011 17:42:29 +0000 (10:42 -0700)]
i965: clip: Modify brw_clip_interp_vertex() to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 25 Aug 2011 16:58:30 +0000 (09:58 -0700)]
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>
Paul Berry [Thu, 25 Aug 2011 15:06:31 +0000 (08:06 -0700)]
i965: clip: Modify brw_clip_tri_alloc_regs() to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 25 Aug 2011 03:03:35 +0000 (20:03 -0700)]
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>
Paul Berry [Thu, 25 Aug 2011 02:57:51 +0000 (19:57 -0700)]
i965: clip: rename header_position_offset to the more correct ndc_offset.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 25 Aug 2011 02:51:54 +0000 (19:51 -0700)]
i965: clip: Add VUE map computation to clip stage for Gen4-5.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Wed, 31 Aug 2011 16:31:00 +0000 (09:31 -0700)]
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>
Paul Berry [Wed, 31 Aug 2011 16:33:57 +0000 (09:33 -0700)]
i965: SF: Move outputs_written to a local variable for clarity.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 30 Aug 2011 20:06:14 +0000 (13:06 -0700)]
i965: SF: New implementation of get_attr_override using the VUE map.
This patch changes get_attr_override() (which computes the
relationship between vertex shader outputs and fragment shader inputs)
to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 25 Aug 2011 02:04:31 +0000 (19:04 -0700)]
i965: SF: Remove unnecessary variables.
This patch removes the variables nr_attrs and nr_setup_attrs, whose
purpose is now being served by the VUE map. nr_attr_regs and
nr_setup_regs are still needed, however they are now computed using
the VUE map rather than by counting the number of vertex shader
outputs (which caused subtle bugs when gl_PointSize was written).
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 25 Aug 2011 01:57:32 +0000 (18:57 -0700)]
i965: SF: Stop using nr_setup_attrs in compute_masks.
Previously, the SF used nr_setup_attrs to determine whether it was
looking at the last element of the VUE. Changed this code to use the
VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 25 Aug 2011 01:41:30 +0000 (18:41 -0700)]
i965: SF: Remove attr_to_idx and idx_to_attr.
These data structures were serving the same purpose as the VUE map,
but were buggy. Now that the code has been transitioned to use the
VUE map, they are not needed.
Reviewed-by: Eric Anholt <eric@anholt.net>