Christoph Bumiller [Wed, 14 Sep 2011 14:18:23 +0000 (16:18 +0200)]
nv50/ir: import new shader backend code
Christoph Bumiller [Tue, 13 Sep 2011 21:02:23 +0000 (23:02 +0200)]
nvc0: prevent interruption of m2mf push
M2MF will trap if the data stream is interrupted by a QUERY fence
and report too much or not enough data.
Christoph Bumiller [Fri, 26 Aug 2011 20:59:19 +0000 (22:59 +0200)]
nouveau: make data argument of nouveau_context::push_data const
Brian Paul [Wed, 14 Sep 2011 14:15:14 +0000 (08:15 -0600)]
softpipe: implement blend color clamping
Per the GL spec, clamp incoming colors prior to blending depending on
whether the destination buffer stores normalized (non-float) values.
Note that the constant blend color needs to be clamped too (we always
get the unclamped color from Mesa).
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412
Brian Paul [Wed, 14 Sep 2011 14:09:05 +0000 (08:09 -0600)]
mesa: minor clean-up on _mesa_unclamped_float_rgba_to_ubyte()
Add a comment and reformat to be under 80 columns.
Brian Paul [Wed, 14 Sep 2011 14:06:38 +0000 (08:06 -0600)]
mesa: white space, comment fixes in mtypes.h
"vale" was a typo. Fix that and do some other minor clean-ups.
Emeric Grange [Mon, 12 Sep 2011 21:39:33 +0000 (23:39 +0200)]
st/vdpau: Preliminary support for timestamped output surface into the presentation queue
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
Emeric Grange [Mon, 12 Sep 2011 21:39:32 +0000 (23:39 +0200)]
st/vdpau: Output surfaces that are too large to fit into the display target will be clipped
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
Emeric Grange [Mon, 12 Sep 2011 21:39:31 +0000 (23:39 +0200)]
st/vdpau: Add get_clear_color capability
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
Emeric Grange [Mon, 12 Sep 2011 21:39:30 +0000 (23:39 +0200)]
st/vdpau: Add documentation from the VDPAU API and update some traces
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
Emeric Grange [Mon, 12 Sep 2011 21:39:29 +0000 (23:39 +0200)]
st/vdpau: Various whitespace cleanups found while reading some code
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
Emeric Grange [Mon, 12 Sep 2011 21:39:28 +0000 (23:39 +0200)]
nouveau: Add max_references parameter to vl_create_decoder()
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Emeric Grange [Mon, 12 Sep 2011 21:39:27 +0000 (23:39 +0200)]
g3dvl: Add max_references parameter to vl_create_decoder()
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Emeric Grange [Mon, 12 Sep 2011 21:39:26 +0000 (23:39 +0200)]
g3dvl: Add get_clear_color capability
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
Emeric Grange [Mon, 12 Sep 2011 21:39:25 +0000 (23:39 +0200)]
g3dvl: Various whitespace cleanups found while reading some code
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Dave Airlie [Wed, 14 Sep 2011 10:08:57 +0000 (11:08 +0100)]
mesa/colormac: introduce inline helper for 4 unclamped float to ubyte.
This introduces an UNCLAMPED_FLOAT_TO_UBYTE x 4 inline function, as
suggested by Brian. It uses it in a few places I noticed from previous
color changes, and also some core mesa places. I haven't updated other places
yet.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 12 Sep 2011 09:57:40 +0000 (10:57 +0100)]
mesa: introduce a clear color union to be used for int/unsigned buffers
This introduces a new gl_color_union union and moves the current
ClearColorUnclamped to use it, it removes current ClearColor completely and
renames CCU to CC, then all drivers are modified to expected unclamped floats instead.
also fixes st to use translated color in one place it wasn't.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Tue, 13 Sep 2011 15:30:31 +0000 (09:30 -0600)]
st/mesa: fix incorrect debug output
format and type are not GL enums here.
Brian Paul [Tue, 13 Sep 2011 14:16:01 +0000 (08:16 -0600)]
gallivm: remove unused vars
Brian Paul [Mon, 12 Sep 2011 23:04:11 +0000 (17:04 -0600)]
gallium: minor comments for util_format_channel_description fields
Marcin Slusarz [Tue, 13 Sep 2011 13:14:19 +0000 (15:14 +0200)]
nv50/nvc0: add support for R4A4_UNORM and A4R4_UNORM formats
R4A4 is needed by OSD in mplayer's xvmc output
Marek Olšák [Tue, 13 Sep 2011 11:07:46 +0000 (13:07 +0200)]
r600g: fix typo in "r600g: simplify deducing chip family"
Dave Airlie [Mon, 12 Sep 2011 13:44:25 +0000 (14:44 +0100)]
mesa/pack: don't apply transfer operations to integer format buffers. (v3)
The EXT_texture_integer issues says:
Should pixel transfer operations be defined for the integer pixel
path?
RESOLVED: No. Fragment shaders can achieve similar results
with more flexibility. There is no need to aggrandize this
legacy mechanism.
v2: fix comments, fix unpack paths, use same comment/code
v3: fix last comment
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Sun, 11 Sep 2011 19:05:46 +0000 (21:05 +0200)]
r600g: remove unused function r600_buffer_from_handle
Marek Olšák [Sun, 11 Sep 2011 17:31:40 +0000 (19:31 +0200)]
r600g: remove an irrelevant XXX comment
Marek Olšák [Sun, 11 Sep 2011 16:46:54 +0000 (18:46 +0200)]
r600g: remove r600_resource_buffer struct
This subclass of r600_resource doesn't contain any useful members,
so let's just use r600_resource.
Marek Olšák [Sun, 11 Sep 2011 16:01:25 +0000 (18:01 +0200)]
r600g: set the return type of radeon_destroy to void
Marek Olšák [Sun, 11 Sep 2011 15:38:43 +0000 (17:38 +0200)]
r600g: remove r600_drm_public.h
Marek Olšák [Sun, 11 Sep 2011 14:35:10 +0000 (16:35 +0200)]
r600g: inline some of the winsys r600_get functions
Marek Olšák [Sun, 11 Sep 2011 12:57:55 +0000 (14:57 +0200)]
r600g: simplify deducing chip family
Marek Olšák [Sun, 11 Sep 2011 12:53:07 +0000 (14:53 +0200)]
r600g: compute tiling info in the pipe, not in the winsys
The winsys doesn't need it.
Marek Olšák [Sun, 11 Sep 2011 12:07:17 +0000 (14:07 +0200)]
r600g: remove unused ioctl definitions
Marek Olšák [Sun, 11 Sep 2011 11:47:20 +0000 (13:47 +0200)]
r600g: do not loop in radeon_family_from_device
Also move that function to r600_drm.c
Marek Olšák [Sun, 11 Sep 2011 11:28:12 +0000 (13:28 +0200)]
r600g: cleanup build include dirs and dependencies
The scons build still depended on libdrm_radeon.
José Fonseca [Mon, 12 Sep 2011 16:23:47 +0000 (17:23 +0100)]
scons: Don't use gstabs on mingw-64.
Marek Olšák [Mon, 12 Sep 2011 10:46:45 +0000 (12:46 +0200)]
st/mesa: clamp Max program param limits
Setting just MAX_PROGRAM_ENV_PARAMS to 4096 breaks everything,
so let's do this instead.
This fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=40767
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Sun, 11 Sep 2011 15:24:24 +0000 (17:24 +0200)]
pb_buffer: inline 'base' sub-struct
Marek Olšák [Sun, 11 Sep 2011 13:46:47 +0000 (15:46 +0200)]
r300g: handle the new CAPs
Emil Velikov [Sat, 10 Sep 2011 19:07:07 +0000 (14:07 -0500)]
tgsi: fix typo in commit
324ac982d8e7
Reviewed-by: Bryan Cain <bryancain3@gmail.com>
Maarten Lankhorst [Sat, 10 Sep 2011 07:55:55 +0000 (09:55 +0200)]
nouveau: Add support for XvMC acceleration
Try to use the PMPEG where available
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Bryan Cain [Fri, 2 Sep 2011 05:10:50 +0000 (00:10 -0500)]
glsl_to_tgsi: use UARL instead of I2F and ARL
Since TGSI now has a UARL opcode that takes an integer as the source, it is
no longer necessary to hack around the lack of an integer ARL opcode using I2F.
UARL is only emitted when native integers are enabled; ARL is still used
otherwise.
Reviewed-by: Brian Paul <brianp@vmware.com>
Bryan Cain [Sat, 10 Sep 2011 17:31:54 +0000 (12:31 -0500)]
gallium: add TGSI opcodes UARL and UCMP
They are needed by glsl_to_tgsi for an efficient implementation using native
integers.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Sat, 10 Sep 2011 16:42:49 +0000 (18:42 +0200)]
mesa: fix more valgrind warnings
==27540== Invalid read of size 4
==27540== at 0x96277B7: _mesa_make_extension_string (string3.h:144)
==27540== by 0x9604E78: _mesa_make_current (context.c:1514)
==27540== by 0x9602A8B: st_api_make_current (st_manager.c:789)
==27540== by 0x45406E7: ???
==27540== Address 0xad35b30 is 3,688 bytes inside a block of size 3,691 alloc'd
==27540== at 0x4025315: calloc (vg_replace_malloc.c:467)
==27540== by 0x9627641: _mesa_make_extension_string (extensions.c:910)
==27540== by 0x9604E78: _mesa_make_current (context.c:1514)
==27540== by 0x9602A8B: st_api_make_current (st_manager.c:789)
==27540== by 0x45406E7: ???
And:
==28351== Invalid write of size 2
==28351== at 0x4C087CC: _mesa_make_extension_string (string3.h:144)
==28351== by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351== by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351== Address 0x48dd1f3 is 19 bytes inside a block of size 20 alloc'd
==28351== at 0x4025315: calloc (vg_replace_malloc.c:467)
==28351== by 0x4C08711: _mesa_make_extension_string (extensions.c:778)
==28351== by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351== by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351==
==28351== Invalid read of size 4
==28351== at 0x4C087EC: _mesa_make_extension_string (extensions.c:806)
==28351== by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351== by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
==28351== Address 0x48dd1f4 is 0 bytes after a block of size 20 alloc'd
==28351== at 0x4025315: calloc (vg_replace_malloc.c:467)
==28351== by 0x4C08711: _mesa_make_extension_string (extensions.c:778)
==28351== by 0x4BE6198: _mesa_make_current (context.c:1514)
==28351== by 0x4BD4CAB: st_api_make_current (st_manager.c:789)
The first part adds 2, because ' ' and '\0' may be written at the end
of the buffer.
Brian Paul [Sat, 10 Sep 2011 16:20:52 +0000 (10:20 -0600)]
draw/llvm: combine draw_llvm_generate() and draw_llvm_generate_elts()
These two functions were nearly the same with lots of duplicated code.
Now pass in a boolean 'elts' flag and use a few conditionals to implement
the linear vs. indexed cases.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Tom Stellard [Mon, 5 Sep 2011 13:57:36 +0000 (06:57 -0700)]
r300/compiler: Implement ROUND
According to the GLSL spec, the implementor can decide which way to round
when the fraction is .5. The r300 compiler will round down.
Marek Olšák [Sat, 10 Sep 2011 13:12:54 +0000 (15:12 +0200)]
mesa: fix a valgrind warning
==5715== Invalid read of size 4
==5715== at 0x4AA590B: _mesa_make_extension_string (extensions.c:908)
==5715== by 0x4A83198: _mesa_make_current (context.c:1514)
==5715== by 0x4A71CAB: st_api_make_current (st_manager.c:789)
==5715== Address 0x4795730 is 0 bytes inside a block of size 1 alloc'd
==5715== at 0x4025315: calloc (vg_replace_malloc.c:467)
==5715== by 0x4AA5B4C: _mesa_make_extension_string (extensions.c:772)
==5715== by 0x4A83198: _mesa_make_current (context.c:1514)
==5715== by 0x4A71CAB: st_api_make_current (st_manager.c:789)
Marek Olšák [Sat, 10 Sep 2011 10:33:02 +0000 (12:33 +0200)]
st/dri: remove the call to driInitExtensions
The function no longer exists. This fixes Gallium build.
Marek Olšák [Mon, 5 Sep 2011 06:01:24 +0000 (08:01 +0200)]
r600g: fix shadow rect samplers
Marek Olšák [Mon, 5 Sep 2011 05:18:18 +0000 (07:18 +0200)]
r600g: use SAMPLE_LB for OPCODE_TXB
Marek Olšák [Sun, 4 Sep 2011 02:41:52 +0000 (04:41 +0200)]
r600g: enable texture arrays
Marek Olšák [Mon, 5 Sep 2011 01:32:12 +0000 (03:32 +0200)]
r600g: add support for shadow array samplers
I had to guess & verify how some of the SAMPLE instructions work.
Marek Olšák [Sun, 4 Sep 2011 02:23:02 +0000 (04:23 +0200)]
r600g: implement texture arrays for evergreen
Marek Olšák [Sun, 4 Sep 2011 00:58:41 +0000 (02:58 +0200)]
r600g: always decompress all mipmaps and layers, slices, or faces of zbuffers
This fixes piglit/fbo-depth-array.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Marek Olšák [Fri, 2 Sep 2011 05:35:48 +0000 (07:35 +0200)]
r600g: fix texture array filtering
This fixes piglit/fbo-generatemipmap-array.
It looks like SQ_TEX_SAMPLER_WORD0_0.TEX_ARRAY_OVERRIDE should be set
for array textures in order to disable filtering between slices,
which adds a dependency between sampler views and sampler states.
This patch reworks sampler state updates such that they are postponed until
draw time. TEX_ARRAY_OVERRIDE is updated according to bound sampler views.
This also consolidates setting the texture state between vertex and
pixel shaders.
Marek Olšák [Mon, 5 Sep 2011 04:11:26 +0000 (06:11 +0200)]
glsl_to_tgsi: fix shadow2DArray comparison
v2: adjust the assertion, add a comment
Marek Olšák [Mon, 5 Sep 2011 04:09:37 +0000 (06:09 +0200)]
ir_to_mesa: fix shadow2DArray comparison
The depth should be in W.
v2: adjust the assertion, add a comment
Marek Olšák [Mon, 5 Sep 2011 01:30:02 +0000 (03:30 +0200)]
u_blitter: add texture array support
Reviewed-by: Dave Airlie <airlied@redhat.com>
Marek Olšák [Mon, 5 Sep 2011 01:25:34 +0000 (03:25 +0200)]
st/mesa: convert shadow array samplers to TGSI
Marek Olšák [Mon, 5 Sep 2011 01:23:05 +0000 (03:23 +0200)]
gallium: add shadow 1D and 2D array samplers to TGSI
And filling in all the switch statements in auxiliary. Mostly untested.
Marek Olšák [Mon, 5 Sep 2011 20:52:21 +0000 (22:52 +0200)]
gallium: add PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS
v2: remove PIPE_CAP_ARRAY_TEXTURES in favor of the new CAP.
Ian Romanick [Mon, 22 Aug 2011 23:00:03 +0000 (16:00 -0700)]
dri: Remove all extension enabling utility functions
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Tue, 30 Aug 2011 22:22:03 +0000 (15:22 -0700)]
swrast-dri: Remove call to driInitExtensions
The only purpose this call served in the DRI swrast driver was to
initialize the remap table. Core Mesa already does the dispatch
offset remapping for every function that could possibly ever be
supported. There's no need to continue using that cruft in the
driver.
Ian Romanick [Mon, 22 Aug 2011 20:39:47 +0000 (13:39 -0700)]
radeon: Enable extensions by just setting the flags
Core Mesa already does the dispatch offset remapping for every
function that could possibly ever be supported. There's no need to
continue using that cruft in the driver.
Since the call to _mesa_enable_imaging_extensions (via
driInitExtensions) is removed, EXT_blend_color, EXT_blend_logic_op,
and EXT_blend_minmax are no longer advertised. These all resulted in
software fallbacks, so their loss will not be mourned.
EXT_blend_subtract is, however, explicitly added to the list.
GL_FUNC_SUBTRACT is fully accelerated, but GL_FUNC_REVERSE_SUBTRACT
(still) results in a software fallback.
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Ian Romanick [Mon, 22 Aug 2011 22:05:11 +0000 (15:05 -0700)]
r600: Enable extensions by just setting the flags
Core Mesa already does the dispatch offset remapping for every
function that could possibly ever be supported. There's no need to
continue using that cruft in the driver.
Since the call to _mesa_enable_imaging_extensions (via
driInitExtensions) is removed, EXT_blend_color is explicitly added to
the list.
EXT_blend_logic_op is removed from the list of extensions because
blend factors and separate blend equations are not handled correctly.
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Ian Romanick [Mon, 22 Aug 2011 21:59:33 +0000 (14:59 -0700)]
r300: Enable extensions by just setting the flags
Core Mesa already does the dispatch offset remapping for every
function that could possibly ever be supported. There's no need to
continue using that cruft in the driver.
Since the call to _mesa_enable_imaging_extensions (via
driInitExtensions) is removed, EXT_blend_color is explicitly added to
the list.
EXT_blend_logic_op is removed from the list of extensions because
blend factors and separate blend equations are not handled correctly.
Based on feedback from Roland Scheidegger.
Cc: Dave Airlie <airlied@redhat.com>
Cc: Alex Deucher <alexdeucher@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Ian Romanick [Mon, 22 Aug 2011 22:58:24 +0000 (15:58 -0700)]
r200: Enable extensions by just setting the flags
Core Mesa already does the dispatch offset remapping for every
function that could possibly ever be supported. There's no need to
continue using that cruft in the driver.
Since the call to _mesa_enable_imaging_extensions (via
driInitExtensions) is removed, EXT_blend_color is explicitly added
with a dependency on the drmSupportsBlendColor flag.
EXT_blend_logic_op is removed from the list of extensions because
blend factors and separate blend equations are not handled correctly.
Based on feedback from Roland Scheidegger.
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Ian Romanick [Mon, 22 Aug 2011 22:58:01 +0000 (15:58 -0700)]
nouveau: Enable extensions by just setting the flags
Core Mesa already does the dispatch offset remapping for every
function that could possibly ever be supported. There's no need to
continue using that cruft in the driver.
Since the call to _mesa_enable_imaging_extensions (via
driInitExtensions) is removed, EXT_blend_color, EXT_blend_minmax, and
EXT_blend_subtract are explicitly added to the list.
EXT_blend_logic_op is removed from the list of extensions because
blend factors and separate blend equations are not handled correctly.
Cc: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: Viktor Novotný <noviktor@seznam.cz>
Ian Romanick [Mon, 22 Aug 2011 20:18:06 +0000 (13:18 -0700)]
intel: Move S3TC extension enable bits to intel_extensions.c
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 22 Aug 2011 20:15:42 +0000 (13:15 -0700)]
intel: Enable extensions by just setting the flags
Core Mesa already does the dispatch offset remapping for every
function that could possibly ever be supported. There's no need to
continue using that cruft in the driver.
EXT_blend_logic_op is removed from the list of extensions because
blend factors and separate blend equations are not handled correctly.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Brian Paul [Fri, 9 Sep 2011 19:59:20 +0000 (13:59 -0600)]
llvmpipe: add some null pointer checks
It's not clear if these are acceptable cases so issue a one-time warning
in debug builds when we hit them.
Fixes segfault in piglit fbo-mipmap-copypix test.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Ian Romanick [Fri, 26 Aug 2011 00:42:16 +0000 (17:42 -0700)]
nvprogram: Silence "warning: unused parameter ‘ctx’"
Ian Romanick [Thu, 25 Aug 2011 23:59:02 +0000 (16:59 -0700)]
swrast: Silence many "warning: unused parameter ‘ctx’"
Not all drivers use ctx in LOCAL_VARS, so '(void) ctx;' is added to
all the function templates to make GCC happy.
Ian Romanick [Thu, 25 Aug 2011 23:55:18 +0000 (16:55 -0700)]
tnl_dd: Silence "tnl_dd/t_dd_tritmp.h:292:3: warning: suggest braces around empty body in an ‘if’ statement"
Ian Romanick [Sun, 21 Aug 2011 23:06:47 +0000 (16:06 -0700)]
spantmp2: Silence many "warning: unused parameter ‘ctx’"
Not all drivers use ctx in LOCAL_VARS, so '(void) ctx;' is added to
all the function templates to make GCC happy.
Ian Romanick [Fri, 19 Aug 2011 15:55:19 +0000 (08:55 -0700)]
mesa: Silence "main/teximage.h:148:72: warning: unused parameter ‘texObj’"
Ian Romanick [Fri, 26 Aug 2011 00:04:11 +0000 (17:04 -0700)]
swrast-dri: Silence several "warning: unused parameter"
Ian Romanick [Fri, 26 Aug 2011 00:51:41 +0000 (17:51 -0700)]
dri: Silence several "warning: unused parameter"
Ian Romanick [Sun, 21 Aug 2011 23:31:35 +0000 (16:31 -0700)]
dri_util: Silence several "warning: unused parameter"
The parameters can't be removed because they are part of the DRI ABI.
Ian Romanick [Fri, 26 Aug 2011 17:53:43 +0000 (10:53 -0700)]
intel: Silence "intel/intel_fbo.h:105:4: warning: comparison of unsigned expression < 0 is always false"
The test was of an enum, attIndex, which should be unsigned. The
explicit check for < 0 was replaced with a cast to unsigned in an
assertion that attIndex is less than the size of the array it will be
used to index.
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Fri, 26 Aug 2011 17:24:36 +0000 (10:24 -0700)]
intel: Silence several "warning: unused parameter"
Trivially silence the compiler by adding '(void) foo;' for each unused
parameter. These parameters could not be removed. They are part of
interface used elsewhere in Mesa, and some of the other customers
actually use these parameters.
Ian Romanick [Fri, 26 Aug 2011 17:22:49 +0000 (10:22 -0700)]
intel: Silence several "warning: unused parameter"
The internalFormat, format, and type parameters were not used by
either try_pbo_upload or try_pbo_zcopy, so remove them. The width
parameter was also not used by try_pbo_zcopy (because it doesn't
actually copy anything), so remove it too.
Eric Anholt notes:
The current structure of this code is so hateful I can't bring
myself to say anything about whether changing the current code is
good or bad.
I have a dream that one call would try to make a surface
(miptree/region) out of the PBO, then we'd see about whether it
matches up nicely and zero-copy/blit using that. That would be
reusable for texsubimage, which is currently awful in this
respect.
At some point we should revisit this code with pitchforks and torches.
Ian Romanick [Fri, 26 Aug 2011 17:15:47 +0000 (10:15 -0700)]
intel: Silence "warning: unused parameter ‘depth0’"
The depth0 parameter was not used in intel_miptree_create_for_region,
so remove it. All of the places that call this function, pass 1 for
that parameter, and the place where it looks like it should have been
used (the call to intel_miptree_create_internal) also had 1 hard
coded.
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Fri, 26 Aug 2011 17:03:26 +0000 (10:03 -0700)]
intel: Silence "warning: unused parameter ‘target’"
The GLenum target parameter was not used in intel_copy_texsubimage, so
remove it. Also remove the GLenum internalFormat parameter. Each
caller just copied this out of the intel_texture_image that is already
passed to intel_copy_texsubimage.
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Fri, 26 Aug 2011 16:57:51 +0000 (09:57 -0700)]
intel: Silence several "warning: unused parameter"
The intel_context and tiling parameters were not used by any if the
i9[14]5_miptree_layout or the functions they call, and the tiling parameter was
not used by brw_miptree_layout. Remove the unnecessary parameters.
Ian Romanick [Fri, 26 Aug 2011 16:54:40 +0000 (09:54 -0700)]
intel: Silence "warning: unused parameter ‘fb’"
The gl_framebuffer was not used in intel_draw_buffer, so remove it.
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Fri, 26 Aug 2011 01:11:32 +0000 (18:11 -0700)]
intel: Silence "warning: unused parameter ‘intel’"
The intel_context was not used in any of these functions, so remove it.
Ian Romanick [Sun, 21 Aug 2011 23:42:21 +0000 (16:42 -0700)]
intel: Silence several "warning: unused parameter"
Also clean-up some of the naming, etc. in
intel_buffer_object_purgeable. 'intel' is usually used as the name of
an intel_context pointer, and intel_obj is usually used as the name of
an intel_*_obj pointer. These changes were suggested by Eric Anholt.
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Sun, 21 Aug 2011 23:41:22 +0000 (16:41 -0700)]
intel: Silence many "intel_batchbuffer.h:97:39: warning: comparison between signed and unsigned integer expressions"
v2: Remove the assertion in intel_batchbuffer_space:
assert((intel->batch.state_batch_offset - intel->batch.reserved_space)
>= intel->batch.used*4);
After reviewing all the places where this is called, I'm (fairly)
comfortable that this assertion was redundant. Having the assertion
adds ~20KiB to a driver build:
text data bss dec hex filename
903173 26392 1552 931117 e352d i965_dri.so
924093 26392 1552 952037 e86e5 i965_dri.so
Based on feedback from Eric Anholt.
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Sun, 21 Aug 2011 22:44:35 +0000 (15:44 -0700)]
glsl: Silence "ast_to_hir.cpp:1984:25: warning: comparison of unsigned expression >= 0 is always true"
ast_type_qualifier::location should have been a signed integer from
the beginning, and the giant comment in
apply_type_qualifier_to_variable explains why.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40207
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 29 Aug 2011 21:56:29 +0000 (14:56 -0700)]
glsl: Silence several "warning: unused parameter"
Brian Paul [Fri, 9 Sep 2011 18:17:53 +0000 (12:17 -0600)]
nouveau: remove target parameter from nouveau_bufferobj_map_range()
This was missed back when the target parameter was removed from all
the buffer-related driver hooks.
Brian Paul [Fri, 9 Sep 2011 14:06:29 +0000 (08:06 -0600)]
st/mesa: init program MaxLocalParams, MaxEnvParams limits
Use the same limit for all parameter classes.
Chia-I Wu [Fri, 9 Sep 2011 03:59:50 +0000 (11:59 +0800)]
d3d1x: fix a build error
Fix for the st/egl interface change since
08e1076fd2d3f6fb879dd2529e7d035d6a399da2.
Eric Anholt [Thu, 1 Sep 2011 23:43:38 +0000 (16:43 -0700)]
i965/vs: Allow copy propagation on GRFs.
Further reduces instruction count by 4.0% in 40.7% of the vertex
shaders.
Eric Anholt [Thu, 1 Sep 2011 23:40:07 +0000 (16:40 -0700)]
i965/vs: Clear tracked copy propagation values whose source gets overwritten.
This only occurs for GRFs, and hasn't mattered until now because we
only copy propagated non-GRFs.
Eric Anholt [Thu, 1 Sep 2011 23:21:14 +0000 (16:21 -0700)]
i965/vs: Add support for copy propagation of the UNIFORM and ATTR files.
Removes 2.0% of the instructions from 35.7% of vertex shaders in shader-db.
Eric Anholt [Tue, 30 Aug 2011 20:25:15 +0000 (13:25 -0700)]
i965/vs: Add constant propagation to a few opcodes.
This differs from the FS in that we track constants in each
destination channel, and we we have to look at all the swizzled source
channels. Also, the instruction stream walk is done in an O(n) manner
instead of O(n^2).
Across shader-db, this reduces 8.0% of the instructions from 60.0% of
the vertex shaders, leaving us now behind the old backend by 11.1%
overall.
Eric Anholt [Thu, 1 Sep 2011 15:34:18 +0000 (08:34 -0700)]
i965/vs: Keep track of indices into a per-register array for virtual GRFs.
Tracking virtual GRFs has tension between using a packed array per
virtual GRF (which is good for register allocation), and sparse arrays
where there's an element per actual register (so the first and second
column of a mat2 can be distinguished inside of an optimization pass).
The FS mostly avoided the need for this second sparse array by doing
virtual GRF splitting, but that meant that instances where virtual GRF
splitting didn't work, instructions using those registers got much
less optimized.
Eric Anholt [Wed, 7 Sep 2011 01:03:43 +0000 (18:03 -0700)]
i965/vs: Switch to the new VS backend by default.
Now instead of env INTEL_NEW_VS=1 to get it, you need INTEL_OLD_VS=1
to not get it. While it's not quite to the same codegen efficiency as
the old backend, it is not regressing piglit on G965 and G45, and
actually fixing bugs on gen6, and the remaining codegen quality
regressions all appear tractable.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 7 Sep 2011 05:32:33 +0000 (22:32 -0700)]
i965/vs: Add support for overflowing the number of available push constants.
Fixes glsl-vs-uniform-array-4.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33742
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>