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>
Paul Berry [Wed, 24 Aug 2011 22:48:55 +0000 (15:48 -0700)]
i965: SF: Change calculate_masks to use the VUE map.
Previously, SF code used the idx_to_attr[] array to compute the
location of entries in the VUE map. This array didn't properly
account for gl_PointSize. Now we use the VUE map directly.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Wed, 24 Aug 2011 22:32:17 +0000 (15:32 -0700)]
i965: SF: Change the flags that refer to "attr" to be based on gl_vert_result.
Previously, some of the code in SF erroneously used bitfields based on
the gl_frag_attrib enum when actually referring to vertex results.
This worked, because coincidentally the particular enum values being
used happened to match between gl_frag_attrib and gl_vert_result. But
it was fragile, because a future change to either gl_vert_result or
gl_frag_attrib would have made the enum values stop matching up. This
patch switches the SF code to use the correct enum.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Wed, 24 Aug 2011 19:19:10 +0000 (12:19 -0700)]
i965: SF: change get_vert_attr to use the VUE map, and rename it.
The new function, called get_vert_result(), uses the VUE map to find
the register containing a given vertex attribute. Previously, we used
the attr_to_idx[] array, which served the same purpose but didn't
account for gl_PointSize correctly.
This fixes a bug on pre-Gen6 wherein the back side of a triangle would
be rendered incorrectyl if the vertex shader wrote to gl_PointSize.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 22:49:32 +0000 (15:49 -0700)]
i965: SF: Modify calculate_point_sprite_mask to use the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 20:49:19 +0000 (13:49 -0700)]
i965: SF: Move the computation of urb_entry_read_offset.
This patch moves the computation of the SF URB entry read offset from
upload_sf_unit() to its own function, so that it can be re-used when
creating the gen4-5 SF program.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 18:43:46 +0000 (11:43 -0700)]
i965: new VS: Compute urb entry size based on the VUE map.
Previously, the new VS backend computed the size of the URB entry by
counting the number of MRFs used in emitting the URB entry. Now it
just gets it straight from the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 18:41:41 +0000 (11:41 -0700)]
i965: new VS: Clarify comments about max_usable_mrf and add an assertion.
max_usable_mrf has been carefully set such that (max_usable_mrf -
base_mrf) is a multiple of 2, so that an even number of VUE slots are
emitted with each URB write (which Gen6 requires). This patch adds an
assertion to confirm that this is the case, and moves the comment to
this effect to be near the assertion.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 18:07:56 +0000 (11:07 -0700)]
i965: new VS: use the VUE map to write out vertex attributes.
Previously, the new VS backend used two functions,
emit_vue_header_gen6() and emit_vue_header_gen4() to emit the fixed
parts of the VUE, and then a pair of carefully-constructed loops to
emit the rest of the VUE, leaving out the parts that were already
emitted as part of the header.
This patch changes the new VS backend to use the VUE map to emit the
entire VUE.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 17:41:31 +0000 (10:41 -0700)]
i965: new VS: move clip distance computation (GEN5+) to a separate function.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 17:29:48 +0000 (10:29 -0700)]
i965: new VS: Move PSIZ/flags computation to a separate function.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 17:26:15 +0000 (10:26 -0700)]
i965: new VS: move NDC computation (GEN4-5) to a separate function.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 17:17:34 +0000 (10:17 -0700)]
i965: new VS: Use output_reg[] to find NDC and HPOS registers.
Previously, emit_vue_header_gen4() used local variables to keep track
of which registers were storing the NDC and HPOS. This patch uses the
output_reg[] array instead, so that the code that manipulates NDC and
HPOS can be more easily refactored.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 23 Aug 2011 05:09:02 +0000 (22:09 -0700)]
i965: old VS: use the VUE map to compute the URB entry size.
Previously, the old VS backend computed the URB entry size by adding
the number of vertex shader outputs to the size of the URB header.
This often produced a larger result than necessary, because some
vertex shader outputs are stored in the header, so they were being
double counted. This patch changes the old VS backend to compute the
URB entry size directly from the number of slots in the VUE map.
Note: there's a subtle change in that we no longer count header
registers towards the size of the VF input. I believe this is
correct, because the header is only emitted in the output of the VS
stage--it is not present in the input. (As evidence for this, note
that brw_vs_state.c sets urb_entry_read_offset to 0--it does not
include space for the header as part of the VS input).
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Wed, 31 Aug 2011 22:04:42 +0000 (15:04 -0700)]
i965: old VS: Use brw_vue_map instead of implicit assumptions about VUE structure.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 1 Sep 2011 22:30:21 +0000 (15:30 -0700)]
i965: Add functions to compute offsets within the VUE map.
Some parts of the i965 driver keep track of locations within the VUE
(vertex URB entry) using byte offsets. This patch adds inline
functions to compute these byte offsets using the VUE map.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Wed, 31 Aug 2011 22:04:23 +0000 (15:04 -0700)]
i965: Write code to compute a VUE map.
Several places in the i965 code make implicit assumptions about the
structure of data in the VUE (vertex URB entry). This patch adds a
function, brw_compute_vue_map(), which computes the structure of the
VUE explicitly. Future patches will modify the rest of the driver to
use the explicitly computed map rather than rely on implicit
assumptions about it.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Tue, 30 Aug 2011 18:46:29 +0000 (11:46 -0700)]
Refactor code that converts between gl_vert_result and gl_frag_attrib.
Previously, this conversion was duplicated in several places in the
i965 driver. This patch moves it to a common location in mtypes.h,
near the declaration of gl_vert_result and gl_frag_attrib.
I've also added comments to remind us that we may need to revisit the
conversion code when adding elements to gl_vert_result and
gl_frag_attrib.
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Tue, 6 Sep 2011 15:19:36 +0000 (09:19 -0600)]
docs: more info about non-subscriber list postings
Brian Paul [Tue, 6 Sep 2011 14:40:53 +0000 (08:40 -0600)]
docs: update link, remove dead links
José Fonseca [Tue, 6 Sep 2011 12:14:09 +0000 (13:14 +0100)]
scons: Set -static-libstdc++ on mingw-w64
To avoid depending on libstdc++-xxx.dll
José Fonseca [Tue, 6 Sep 2011 12:13:32 +0000 (13:13 +0100)]
scons: Move MinGW flags from crossmingw.py to gallium.py
So that they are used by native MinGW compilers too.
Dave Airlie [Wed, 24 Aug 2011 12:29:56 +0000 (13:29 +0100)]
r600g: add TXQ and TXF support
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 5 Aug 2011 18:08:10 +0000 (19:08 +0100)]
r600g: add initial evergreen integer opcode support
This just adds the opcodes for evergreen, need to work on r600 and cayman
implementations.
don't advertise nativeintegers yet until we work out all the regressions.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 4 Sep 2011 07:25:00 +0000 (08:25 +0100)]
docs: update gl3.txt for ARB_vertex_type_2_10_10_10_rev
Dave Airlie [Sat, 19 Feb 2011 21:04:19 +0000 (07:04 +1000)]
mesa/st: add support for 2101010 vertex format conversion.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sat, 13 Aug 2011 14:30:38 +0000 (15:30 +0100)]
mesa/varray: add interface support for ARB_vertex_type_2_10_10_10_rev (v2)
This just adds all the API check for vertex arrays using 2101010 types.
2101010 is also useable with GL_BGRA.
v2: fix whitespace.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Dave Airlie [Sun, 4 Sep 2011 08:04:13 +0000 (09:04 +0100)]
mesa/vbo: add ARB_vertex_type_2_10_10_10_rev APIs.
This adds the vertex processing paths for the 2101010 types. It converts
the attributes to floats for all the immediate entry points, some entrypoints
are normalised and the attrib APIs take a normalized parameter.
There are four main paths,
ui10 -> float unnormalized
i10 -> float unnormalized
ui10 -> float normalized
i10 -> float normalized
along with the ui2/i2 equivs.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 21 Nov 2010 22:12:57 +0000 (08:12 +1000)]
mesa: add initial API changes for ARB_vertex_type_2_10_10_10_rev.
add new APIs to the internal mesa driver interface + set funcs in vtxfmt.c
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Dave Airlie [Sun, 4 Sep 2011 07:45:32 +0000 (08:45 +0100)]
glapi: regen API files for new extension
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 21 Nov 2010 22:11:46 +0000 (08:11 +1000)]
glapi: add ARB_vertex_type_2_10_10_10_rev entrypoints. (v2)
These are the new API entrypoints for ARB_vertex_type_2_10_10_10_rev
extension, along with the new INT_2_10_10_10_REV enum.
v2: fixup crazy whitespace cut-n-paste mess
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bryan Cain [Mon, 5 Sep 2011 19:54:37 +0000 (14:54 -0500)]
mesa: add a UniformBooleanTrue option
Drivers supporting native integers set UniformBooleanTrue to the integer value
that should be used for true when uploading uniform booleans. This is ~0 for
Gallium and 1 for i965.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Dave Airlie [Mon, 5 Sep 2011 14:03:34 +0000 (15:03 +0100)]
r600g: add 10/10/10/2 vertex format conversion.
Dave Airlie [Sun, 21 Nov 2010 22:11:03 +0000 (08:11 +1000)]
gallium: add missing formats for ARB_vertex_type_2_10_10_10_rev
This just reorgs one define in csv file, and adds all the new formats
that are needed for this extension.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Tobias Droste [Sun, 4 Sep 2011 01:14:23 +0000 (03:14 +0200)]
gallivm: fix build with LLVM 3.0svn
LLVM 3.0svn moved TargetRegistry.h and TargetSelect.h.
See revision 138450 of LLVM.
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Bryan Cain [Sun, 4 Sep 2011 19:31:16 +0000 (14:31 -0500)]
glsl_to_tgsi: fixes for native integers and integer booleans
This fixes all but one of the piglit regressions from enabling native integers
in softpipe. The change to fix the last regression is still being discussed.
Maarten Lankhorst [Fri, 2 Sep 2011 14:20:02 +0000 (16:20 +0200)]
xvmc: Replace frame_started by picture_structure
The preferred solution to keeping track of the picture structure
has been putting it in the state tracker, so use picture_structure
instead of frame_started to check if a frame needs to begin.
If picture_structure has been changed, end the frame and start again.
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Yuanhan Liu [Sat, 3 Sep 2011 22:02:14 +0000 (06:02 +0800)]
intel: fix build error
Fix a build error introduced by commit
6862b54f:
i965_dri.so.tmp: undefined reference to `strerr'
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Marek Olšák [Tue, 30 Aug 2011 17:10:06 +0000 (19:10 +0200)]
mesa: handle zero-size buffers in MapBuffer and ranges in MapBufferRange (v3)
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Tue, 30 Aug 2011 15:11:34 +0000 (17:11 +0200)]
glsl_to_tgsi: fix more potential shader reference leaks
The last one has been pointed out by Ian.
Eugeni Dodonov [Fri, 2 Sep 2011 13:29:31 +0000 (10:29 -0300)]
intel: Give an explanation why we are exiting for debugging.
This could happen in 3 different cases, and ERRNO can explain what
happened. First case would be EIO (gpu hang), second EINVAL (something is
wrong inside the batch), and we also discovered that sometimes it happens
with ENOSPACE. All of those cases are different it it could be worth to at
least know what happened.
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Kenneth Graunke [Tue, 30 Aug 2011 19:34:13 +0000 (12:34 -0700)]
i965/vs: Fix NULL pointer dereference in pre-Gen6 push constant loading.
According to the comment, we need to load /some/ push constants on
pre-Gen6 hardware or the GPU will hang. The existing code set these
bogus parameters to NULL pointers; unfortunately, the code in
brw_curbe.c that loads them dereferences those pointers. So, change
them to be pointers to an actual floating point value of 0.0.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Wed, 31 Aug 2011 00:36:57 +0000 (17:36 -0700)]
intel: Upload batchbuffer contents even if INTEL_NO_HW is set.
It is useful for debugging to dump batchbuffers while not actually
executing them.
Dave Airlie [Mon, 29 Aug 2011 13:35:16 +0000 (14:35 +0100)]
gallium: add caps for MIN/MAX texel offsets.
As per Brian's suggestion, add caps for drivers that support texture
offsets to advertise a min/max via TGSI, also use it in the state tracker.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Fri, 26 Aug 2011 09:59:18 +0000 (10:59 +0100)]
tgsi: add support for texture offsets to the TGSI IR. (v2)
This adds tokens for texture offsets, to store 4 * swizzled vec 3
for use in TXF and other opcodes.
It also contains TGSI exec changes for softpipe to use this code,
along with GLSL->TGSI support for TXF.
v2: add some more comments, add back padding I removed.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Christian König [Thu, 1 Sep 2011 11:54:08 +0000 (13:54 +0200)]
st/vdpau: Implement VdpOutputSurfacePutBitsIndexed and VdpOutputSurfaceRenderOutputSurface
This gets mplayers menu overlay working.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Thu, 1 Sep 2011 11:41:12 +0000 (13:41 +0200)]
st/xvmc: the alpha component of palette entries isn't used
Christian König [Thu, 1 Sep 2011 11:37:17 +0000 (13:37 +0200)]
g3dvl: extend the functionality of the compositor
Prepares for vdpau menu overlay.
Christian König [Thu, 1 Sep 2011 16:36:21 +0000 (18:36 +0200)]
gallium: add R8A8 and A8R8 UNORM formats
They are mostly used for menu overlay in video decoding.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Tue, 30 Aug 2011 13:51:42 +0000 (15:51 +0200)]
st/xvmc: remove L4A4_UNORM workaround
This is no longer needed, since we now have native support for IA44 and AI44.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Tue, 30 Aug 2011 13:43:03 +0000 (15:43 +0200)]
r600g: add support for R4A4 and A4R4 textures.
Sampling worked out of the box, but this make them work as surface as well.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Christian König [Tue, 30 Aug 2011 11:56:31 +0000 (13:56 +0200)]
gallium: try to cleanup a bit of the format mess created with pipe-video merge
Start with correctly defining IA44 and AI44 formats.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Kristian Høgsberg [Thu, 1 Sep 2011 13:54:10 +0000 (09:54 -0400)]
wayland: Use wl_resource_* error functions
Benjamin Franzke [Thu, 1 Sep 2011 07:17:04 +0000 (09:17 +0200)]
egl_dri2: Destroy callback in release_pending_buffer
Benjamin Franzke [Thu, 1 Sep 2011 06:48:27 +0000 (08:48 +0200)]
wayland-drm: Fix compilation with wayland master
c661ecce introduced some not-yet-upstream stuff.
Brian Paul [Thu, 1 Sep 2011 03:30:02 +0000 (21:30 -0600)]
swrast: get rid of needless do/while
Brian Paul [Thu, 1 Sep 2011 03:22:52 +0000 (21:22 -0600)]
mesa: fix broken store_texel() functions
This fixes the swrast failures for piglit's fbo-generatemipmap-formats
test (for uncompressed formats). At some point down the road this code
will go away so I haven't checked all the other store_texel() functions.
Chia-I Wu [Sun, 21 Aug 2011 13:47:28 +0000 (21:47 +0800)]
intel: fix GLESv1 support
Add intelInitExtensionsES1 to enable required and optional GLESv1
extensions.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Chia-I Wu [Sun, 21 Aug 2011 13:45:21 +0000 (21:45 +0800)]
intel: rename intel_extensions_es2.c to intel_extensions_es.c
We'd like to add intelInitExtensionsES1 to it later.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Chia-I Wu [Wed, 31 Aug 2011 04:31:02 +0000 (12:31 +0800)]
i915: build i915_dri.so for Android
Simple demos such as test-opengl-gl_basic work. SurfaceFlinger does not
work yet due to missing GL_OES_draw_texture support (and maybe more).
Reviewed-by: Chad Versace <chad@chad-versace.us>
Chia-I Wu [Wed, 31 Aug 2011 04:21:28 +0000 (12:21 +0800)]
i915: factor our source lists into Makefile.sources
In preparation for porting i915 to Android, factor its source lists into
a shared makefile. This prevents duplication of source lists, and hence
prevents the Android build from breaking as often.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Chia-I Wu [Wed, 31 Aug 2011 04:31:59 +0000 (12:31 +0800)]
i965: fix Android build
Use $(TARGET_CC) instead of $(CC). Correctly name and set LOCAL_CFLAGS.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Bryan Cain [Wed, 31 Aug 2011 22:28:53 +0000 (17:28 -0500)]
mesa: Replace the EmitNoIfs compiler flag with a MaxIfDepth flag.
This is a better, more fine-grained way of lowering if statements. Fixes the
game And Yet It Moves on nv50.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kristian Høgsberg [Wed, 31 Aug 2011 20:45:04 +0000 (16:45 -0400)]
wayland: Track changes to drop wl_visual
Kristian Høgsberg [Wed, 31 Aug 2011 22:20:06 +0000 (18:20 -0400)]
egl_dri2: Only clear EGL_PIXMAP_BIT if DRI config is double buffered
We don't want to set the pixmap bit in the EGL config if the DRI
config we're adding is a double buffered config. However, don't clear
any other bits the platform might pass in in the surface_type
argument.
Kristian Høgsberg [Mon, 22 Aug 2011 17:53:22 +0000 (13:53 -0400)]
wayland: Track server side wayland changes
Kristian Høgsberg [Wed, 17 Aug 2011 02:38:22 +0000 (22:38 -0400)]
wayland: Use new wl_callback mechanism
Brian Paul [Wed, 31 Aug 2011 20:34:24 +0000 (14:34 -0600)]
mesa: fix comment typo: s/GL_SIGNED_NORMALED/GL_SIGNED_NORMALIZED/
Bryan Cain [Sat, 27 Aug 2011 23:32:58 +0000 (18:32 -0500)]
glsl: Use a separate div_to_mul_rcp lowering flag for integers.
Using multiply and reciprocal for integer division involves potentially
lossy floating point conversions. This is okay for older GPUs that
represent integers as floating point, but undesirable for GPUs with
native integer division instructions.
TGSI, for example, has UDIV/IDIV instructions for integer division,
so it makes sense to handle this directly. Likewise for i965.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Bryan Cain <bryancain3@gmail.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Brian Paul [Tue, 30 Aug 2011 20:24:55 +0000 (14:24 -0600)]
mesa: bump max program local params, max uniforms limit
Some driver support more than 1024.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Tue, 30 Aug 2011 20:24:15 +0000 (14:24 -0600)]
swrast: initialize program native limits
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Sat, 27 Aug 2011 18:13:33 +0000 (11:13 -0700)]
i965/vs: Avoid the emit(), remove(), insert_before() for array instructions.
v2: Add generator instructions for the scratch opcodes.
Add emit_before() for handling ->ir and ->annotation inheritance.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Sat, 27 Aug 2011 17:59:43 +0000 (10:59 -0700)]
i965/vs: Move logic for weird CMP type handling to CMP generators.
v2: Don't bother with the no-dst-reg version of CMP()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Sat, 27 Aug 2011 17:52:16 +0000 (10:52 -0700)]
i965/vs: Convert emit() calls to the new instruction generators.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Sat, 27 Aug 2011 18:07:05 +0000 (11:07 -0700)]
i965/vs: Convert gen6 userclip handling to new generators.
This DP4 had one of its operands missing, so we were generating
garbage clip distances. Using the per-opcode instruction generators
made it obvious.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 26 Aug 2011 23:43:06 +0000 (16:43 -0700)]
i965/vs: Create instruction generators outside of the emit() functions.
v2: Fixed gen6 IF().
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Benjamin Franzke [Wed, 31 Aug 2011 09:40:50 +0000 (11:40 +0200)]
egl_dri2: Drop dri2_surface_type enum
Was only used in platform_wayland, and the remaining egl stack
uses _EGLSurface::Type with one of EGL_{WINDOW,PIXMAP,PBUFFER}_BIT.
Chia-I Wu [Fri, 26 Aug 2011 16:00:18 +0000 (00:00 +0800)]
egl_dri2: add pbuffer support to platform_android
This is a simple change thanks to allocateBuffer.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Chia-I Wu [Fri, 26 Aug 2011 14:09:56 +0000 (22:09 +0800)]
egl_dri2: check the surface type in platform_android
Check the surface type is EGL_WINDOW_BIT before doing anything, in
preparation for pbuffer support.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Chia-I Wu [Fri, 26 Aug 2011 15:49:04 +0000 (23:49 +0800)]
egl_dri2: refactor droid_get_buffers_with_format
Move the loop to parse attachments to its own function.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Chia-I Wu [Fri, 26 Aug 2011 17:42:16 +0000 (01:42 +0800)]
egl_dri2: set ctx->WindowRenderBuffer
Set ctx->WindowRenderBuffer to EGL_BACK_BUFFER. As EGL_WINDOW_BIT of a
config is set only when there is dri_double_buffer, that makes sure
window surfaces are always double-buffered and contexts will render to
the back buffer.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Christoph Bumiller [Tue, 30 Aug 2011 21:44:27 +0000 (23:44 +0200)]
nv50,nvc0: fix multisample format hack
Advertising different format support based on sample count was a
bad idea, it made resolve to window work, but resolve to anything
else would fail.
See
9f4998639c3c47f0b7ee3e2a29b7f3609d3f7796.
Eric Anholt [Tue, 30 Aug 2011 17:31:41 +0000 (10:31 -0700)]
intel: Restructure TexSubImage as just the 2D implementation and blit func.
Fixes a segfault in piglit copyteximage where I accidentally removed
the dst_bo setup in the previous cleanup.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40474
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Sean McNamara <gm.potato.ul@gmail.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Tue, 30 Aug 2011 17:33:23 +0000 (10:33 -0700)]
intel: Remove the passthrough TexSubImage[13]D functions.
All we need for these is _mesa_store_texsubimage[13]d(), since we
don't do the blit path.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Tue, 23 Aug 2011 20:30:42 +0000 (13:30 -0700)]
i965/vs: Fix GL_FIXED setup when a writemask is present.
By emitting code before generate_code(), we ended up in align1 mode
where writemasks don't exist, so we rescaled gl_Vertex.w and things
went badly. By moving GL_FIXED support to the visitor, we end up with
normal codegen, and as a bonus the GL_FIXED setup ends up getting
printed appropriately in debug output.
Fixes gtf/GL2Tests/fixed_data_type
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 23 Aug 2011 19:13:14 +0000 (12:13 -0700)]
i965/vs: Pack live uniform vectors together in the push constant upload.
At some point we need to also move uniform accesses out to pull
constants when there are just too many in use, but we lack tests for
that at the moment.
Fixes glsl-vs-large-uniform-array.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 23 Aug 2011 17:22:50 +0000 (10:22 -0700)]
i965/vs: Track uniforms as separate vectors once we've done array access.
This will make it easier to figure out which elements are totally
unused and not upload them.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Mon, 22 Aug 2011 18:48:04 +0000 (11:48 -0700)]
i965/vs: Don't lower uniform array indexing.
This avoids the massive conditional move array access, and brings code
generation quality for the new VS backend into the realm of efficiency
of the old backend (roughly 20% more instructions generated than
before across shader-db, instead of assertion failing for generating
over 10,000 instructions on many shaders!).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Mon, 22 Aug 2011 17:35:24 +0000 (10:35 -0700)]
i965/vs: Add support for pull constant loads for uniform arrays.
v2: reworked the instruction emit and made use of gen6_resolve_implied_move,
from Ken's review
Eric Anholt [Fri, 26 Aug 2011 23:37:37 +0000 (16:37 -0700)]
i965/vs: Restructure emit() functions around a vec4_instruction constructor.
We sometimes want to put an instruction somewhere besides the end of
the instruction stream, and we also want per-opcode instruction
generation to enable compile-time checking of operands.
Eric Anholt [Mon, 22 Aug 2011 18:32:11 +0000 (11:32 -0700)]
i965: Make the old VS backend record pull constant references in pull_params[].
We'll be using that to track things for the new VS backend, and this will
avoid cluttering brw_vs_surface_state.c for it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 23 Aug 2011 20:46:12 +0000 (13:46 -0700)]
mesa: Fix glGetUniform() type conversions.
We were primarily failing to convert in the NativeIntegers case, which
this fixes. However, we were also just truncating float uniforms when
converting to integer, which does not appear to be the correct
behavior. Note, however, that the NVIDIA drivers also truncate
instead of rounding.
GL_DOUBLE return type is dropped because it was never used and
completely broken. It can be added when there's test code.
Fixes piglit ARB_shader_objects/getuniform
v2: This is a rewrite of my previous glGetUniform patch, which Ken
pointed out missed storage_type-based conversions to integer,
which was totally broken still thanks to a typo in the testcase.
v3: Quote the spec justifying the rounding behavior.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Fri, 19 Aug 2011 18:58:43 +0000 (11:58 -0700)]
mesa: Make the gl_constant_value's bool occupy the same space as float/int.
At least for Intel, all our uniform components are of uint32_t size, either
float or signed or unsigned int. For uploading uniform data in the driver,
it's much easier to upload a full dword per uniform element instead of trying
to pick out the bool byte and then fill in the top 3 bytes of pad with 0.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 19 Aug 2011 18:51:43 +0000 (11:51 -0700)]
i965: Use native integer uniforms when the new VS backend is in use.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 19 Aug 2011 18:42:50 +0000 (11:42 -0700)]
i965/vs: Move the flag for whether to use the new backend to the context.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>