Commit graph

47292 commits

Author SHA1 Message Date
Stéphane Marchesin
e125786be8 i915g: Silence warning. 2011-10-08 20:19:53 -07:00
Stéphane Marchesin
49fea2e039 i915g: Remove old heuristic flusing remains. 2011-10-08 17:42:18 -07:00
Stéphane Marchesin
cd41960e8f i915g: Cleanup caps code a bit. 2011-10-08 17:12:37 -07:00
Marek Olšák
39d7de69b1 pb_bufmgr_cache: flush cache when create_buffer fails and try again
NOTE: This is a candidate for the stable branches.
2011-10-08 18:54:28 +02:00
Dave Airlie
a66a2359d7 st/mesa: add readpixel integer support
This adds support for readpixels integer paths, it deals with the signed/unsigned crossovers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-08 17:46:38 +01:00
Dave Airlie
3213d55d99 st/mesa: add support for int type conversion
This adds the various mesa->gallium and gallium->mesa format conversions
along with the GL->gallium texture choosers for integers.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-08 17:46:03 +01:00
Dave Airlie
a441feb757 gallium: add initial pure integer support (v2)
This add support for unsigned/signed integer types via adding a 'pure' bit
in the format description table. It adds 4 new u_format get/put hooks,
for get/put uint and get/put sint so that accessors can get native access
to the integer bits. This is used to avoid precision loss via float converting
paths.

It doesn't add any float fetchers for these types at the moment, GL doesn't
require float fetching from these types and I expect we'll introduce a lot
of hidden bugs if we start allowing such conversions without an API mandating
it.

It adds all formats from EXT_texture_integer and EXT_texture_rg.

0 regressions on llvmpipe here with this.

(there is some more follow on code in my gallium-int-work branch, bringing
 softpipe and mesa to a pretty integer clean state)

v2: fixup python generator to get signed->unsigned and unsigned->signed
fetches working.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-08 17:44:59 +01:00
Dave Airlie
c2060c0af7 mesa/texformat: add integer fallbacks to other formats
This fixes up the integer format choosing to pick the closest mesa format
then the most likely fallback.

(the formatting in this file needs cleaning in another patch).

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-08 17:44:59 +01:00
Dave Airlie
8f9edbad6f mesa: add packing for int/uint
This just adds a simple packing for GL_UNSIGNED_INT/GL_INT destination formats.
This is enough for at least the gallium drivers to pack both unsigned and signed types for read pixels.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-08 17:44:58 +01:00
Dave Airlie
61285c6cfa u_format: add inline helper to find first non void channel
This is used in a few places in drivers as well, also the integer support
can use it as well.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-08 17:44:58 +01:00
Kenneth Graunke
b861479f83 i965: Fix inconsistent indentation in brw_eu_emit.c.
Most of these functions used three spaces for the first level of
indentation, but four spaces for the next level.  One used tabs and then
three spaces.  Some used 3/4 in a then block but 3/3 in the else block.

Normally I try to avoid field days like this, but since the functions
were so inconsistent, even internally, it was making it difficult to
edit without introducing spurious whitespace changes.

So, just get it over with.  git diff -b shows 0 lines changed.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 20:23:47 -07:00
Marek Olšák
20788a908b r300g: remove unused r300_resource::tex_offset 2011-10-08 02:21:24 +02:00
Ian Romanick
93c26d8baf glsl: Remove unused method ir_variable::component_slots
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 16:39:51 -07:00
Ian Romanick
0c76729f39 mesa: Silence several 'warning: unused parameter' in _mesa_GetnUniformdvARB
This function isn't implemented yet, so none of its parameters are
used yet.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 16:39:51 -07:00
Ian Romanick
97a0fe8e93 mesa: Remove unused function _mesa_append_uniform
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 16:39:51 -07:00
Ian Romanick
e2bdef5380 mesa: Simplify calling Driver.ProgramStringNotify after previous refactors
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2011-10-07 16:39:51 -07:00
Ian Romanick
77d67a44cc mesa: Simplify destroy_shader_program_variants_cb after previous refactors
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 16:39:51 -07:00
Ian Romanick
5a4279f80d mesa: Simplify validate_shader_program after previous refactors
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 16:39:51 -07:00
Ian Romanick
de772c4022 mesa: Use gl_shader_program::_LinkedShaders instead of FragmentProgram
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 16:39:50 -07:00
Ian Romanick
39348bf79f mesa: Use gl_shader_program::_LinkedShaders instead of GeometryProgram
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 16:39:50 -07:00
Ian Romanick
010cc547ca mesa: Use gl_shader_program::_LinkedShaders instead of VertexProgram
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-07 16:39:50 -07:00
Chad Versace
2fae55666e mesa: Close Doxygen group
In dd_function_table, close the Doxygen group beginning with
   \name Support for multiple T&L engines
2011-10-07 15:51:54 -07:00
Marek Olšák
4c417697b6 u_blitter: bind a NULL geometry shader 2011-10-08 00:49:34 +02:00
Marek Olšák
c12c05c198 u_blitter: cleanup checking for and restoring saved states 2011-10-08 00:49:34 +02:00
Marek Olšák
5baa33a738 r300g: disable stream output on SWTCL chipsets
Unimplemented and not so useful for this driver.
2011-10-08 00:49:34 +02:00
Stéphane Marchesin
b7cd18bc49 i915g: Add two new unsupported PIPE_CAPs. 2011-10-07 15:14:39 -07:00
Chad Versace
53f8586373 i915,i830: Remove dead HiZ assertions in *update_draw_buffer()
i915 and i830 hardware doesn't have HiZ, so remove all HiZ related
assertions from *update_draw_buffer().

I've removed the dead format checks completely rather than replace them
with more appropriate checks. This doesn't reduce "assertion coverage",
however, because when I added these HiZ related assertions in c8fdf66
there were no pre-existing checks there.

Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-10-07 10:33:51 -07:00
Brian Paul
793d29d6d3 tnl: fix result vector allocation regression
We need to allocate all the output vectors.
Fixes a regression from commit f7f678331d
Fixes fd.o bugs 41441 and 41492.
2011-10-07 10:58:53 -06:00
Brian Paul
cea946307f i965: make swizzle_for_size() return unsigned
Silences a warning about comparing to an unsigned variable.  It looks like
the result of swizzle_for_size() is always assigned to unsigned vars.

Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-10-07 10:38:30 -06:00
Brian Paul
e967c5b38f i965: make size_swizzles[] static const
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-10-07 10:38:30 -06:00
Brian Paul
4170227407 i965: silence unused var warnings in non-debug builds
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-10-07 10:38:30 -06:00
Brian Paul
13b776ed51 intel: silence uninitialized var warning
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-10-07 10:38:30 -06:00
Brian Paul
23c6eb035b mesa: fix software mipmap generation code for packed Z/stencil formats
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=32458

Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-10-07 09:52:04 -06:00
Brian Paul
9938912ccb r300: fix incompatible pointer type warnings 2011-10-07 08:23:24 -06:00
Brian Paul
8c3b5cf943 mesa: update gl_texture_image comments 2011-10-07 08:23:24 -06:00
Brian Paul
5ac96033c5 swrast: s/FetchTexelf/FetchTexel/ 2011-10-07 08:23:24 -06:00
Brian Paul
26b8dfc8ca swrast: silence unused var warnings in non-debug builds 2011-10-07 08:23:24 -06:00
Brian Paul
ba69c4a002 swrast: remove unused swrast_texture_image::FetchTexelc method
We only use the float-valued function now.
2011-10-07 08:23:24 -06:00
Brian Paul
d7477ad0a3 mesa: fix image unpacking when storing compressed textures
This fixes failures found with the new piglit texsubimage test.

Two things were broken:
1. The dxt code doesn't handle sources images where width != row stride.
   Check for that and take the _mesa_make_temp_ubyte_image() path to get
   an image where width = rowstride.
2. If we don't take the _mesa_make_temp_ubyte_image() path we need to
   take the source image unpacking parameters into account in order to
   get the proper starting memory address of the source texels.

Note: This is a candidate for the 7.11 branch.
2011-10-07 08:14:46 -06:00
Daniel Vetter
530728fb60 i915g: handle seperate stencil clear
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-07 14:31:17 +02:00
Daniel Vetter
ce775dc1b6 i915g: actually try to clear 16bit depth bufs
... with the right value.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-07 14:31:17 +02:00
Daniel Vetter
661b7ef9a8 i915g: hw can't fastclear both depth and color when bbp doesn't match
Do it in two passes in that case.

v2: Don't forget to handle stencil clears.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-07 14:31:17 +02:00
Daniel Vetter
0a6131b15c i915g: disable scissor in fast clear
Docs say this is obeyed.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-07 14:31:17 +02:00
Daniel Vetter
b8f3381f2c i915g: add some obscure sampler formats
4bit palette ftw!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-07 14:31:17 +02:00
Daniel Vetter
8dd523b2df i915g: fixup clear params emission
Docs say that default shader input color input need to be spec
as ARGB8888. And a clear rect prim essentially uses this value
instead of default diffuse. Depth on the other hands is an ieee
32 bit float. Clear stencil is U8.

Completely different are the clear values for zone init prims.
These are speced in the actual output pixel layout (and need
to be repeated for 16 bit formats).

Clear up the confusion by adding some comments.

v2: Retain the target swizzling support added by Stephan Marchesin.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-07 14:31:16 +02:00
Daniel Vetter
305bcda4b5 i915g: make fixup swizzle into a real hw state
This way it can be reused in the fastclear path.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-10-07 14:31:16 +02:00
Jason Wood
c475a54578 glsl: Remove version check when looking for identifiers containing "__".
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2011-10-06 22:39:08 -07:00
Stéphane Marchesin
c2244cfa19 i915g: Announce GL 2.0.
We leave the debug code in place to troubleshoot issues while we complete the transition. That code might be removed after that.
2011-10-06 20:40:49 -07:00
Paul Berry
018ea68d87 i965 Gen6+: De-compact clip planes.
Previously, if the user enabled a non-consecutive set of clip planes
(e.g. 0, 1, and 3), the driver would compact them down to a
consecutive set starting at 0.  This optimization was of dubious
value, and complicated the implementation of gl_ClipDistance.

This patch changes the driver so that with Gen6 and later chipsets, we
no longer compact the clip planes.  However, we still discard any clip
planes beyond the highest number that is in use, so performance should
not be affected for applications that use clip planes consecutively
from 0.

With chipsets previous to Gen6, we still compact the clip planes,
since the pre-Gen6 clipper thread relies on this behavior.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-06 19:29:14 -07:00
Paul Berry
f4f686e825 i965 VS: Change nr_userclip to nr_userclip_planes.
The only remaining uses of brw_vs_prog_key::nr_userclip only occurred
when using clip planes (as opposed to gl_ClipDistance).  This patch
renames the value to nr_userclip_planes and sets it to zero when
gl_ClipDistance is in use.  This avoids unnecessary VS recompiles.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2011-10-06 19:29:10 -07:00