mesa.git
11 years agoglsl/builtins: Fix ARB_texture_cube_map_array built-in availability.
Kenneth Graunke [Fri, 28 Jun 2013 20:46:44 +0000 (13:46 -0700)]
glsl/builtins: Fix ARB_texture_cube_map_array built-in availability.

This patch adds texture() for isamplerCubeArray and usamplerCubeArray,
which were entirely missing.

It also makes texture() with a LOD bias fragment shader specific.  The
main GLSL specification explicitly says that texturing with LOD bias
should not be allowed for vertex shaders.

Affects Piglit's ARB_texture_cube_map_array/compiler/tex_bias-01.vert.
which tries to use bias in a vertex shader.  Currently, it expects this
to pass (so this patch regresses the test), but I've sent a patch to
reverse the expected behavior (so this patch would fix the updated test):
http://lists.freedesktop.org/archives/piglit/2013-June/006123.html

NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
11 years agogallivm: Fix MSVC build.
José Fonseca [Tue, 2 Jul 2013 05:41:32 +0000 (06:41 +0100)]
gallivm: Fix MSVC build.

11 years agogallivm: Fix indirect immediate registers.
José Fonseca [Mon, 1 Jul 2013 19:54:19 +0000 (20:54 +0100)]
gallivm: Fix indirect immediate registers.

If reg->Register.Indirect is true then the immediate is not truly a
constant LLVM expression.

There is no performance regression in using LLVMBuildBitCast, as it will
fallback to LLVMConstBitCast internally when the argument is a constant.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
11 years agogallium/tests: fix the translate test
Zack Rusin [Fri, 28 Jun 2013 13:42:35 +0000 (09:42 -0400)]
gallium/tests: fix the translate test

11 years agoi965: Enable ext_framebuffer_multisample_blit_scaled on intel h/w
Anuj Phogat [Tue, 14 May 2013 15:15:59 +0000 (08:15 -0700)]
i965: Enable ext_framebuffer_multisample_blit_scaled on intel h/w

This patch enables ext_framebuffer_multisample_blit_scaled extension
on intel h/w >= gen6.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
11 years agoi965/blorp: Add bilinear filtering of samples for multisample scaled blits
Anuj Phogat [Fri, 31 May 2013 17:59:50 +0000 (10:59 -0700)]
i965/blorp: Add bilinear filtering of samples for multisample scaled blits

Current implementation of ext_framebuffer_multisample_blit_scaled in
i965/blorp uses nearest filtering for multisample scaled blits. Using
nearest filtering produces blocky artifacts and negates the benefits
of MSAA. That is the reason why extension was not enabled on i965.

This patch implements the bilinear filtering of samples in blorp engine.
Images generated with this patch are free from blocky artifacts and show
big improvement in visual quality.

Observed no piglit and gles3 regressions.

V3:
- Algorithm used for filtering assumes a rectangular grid of samples
  roughly corresponding to sample locations.
- Test the boundary conditions on the edges of texture.

V4:
- Clip texcoords and use conditional MOVs.
- Send texture dimensions as push constants.
- Remove the optimization in case of scaled multisample blits.

V5:
- Move mcs_fetch() inside the 'for' loop after computing pixel coordinates.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
11 years agodocs: Import 9.1.4 release notes, add news item.
Ian Romanick [Mon, 1 Jul 2013 21:42:13 +0000 (14:42 -0700)]
docs: Import 9.1.4 release notes, add news item.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agodraw/translate: fix instancing
Zack Rusin [Fri, 28 Jun 2013 00:40:10 +0000 (20:40 -0400)]
draw/translate: fix instancing

We were incorrectly computing the buffer offset when using the
instances. The buffer offset is always equal to:
start_instance * stride + (instance_num / instance_divisor) *
stride
We were completely ignoring the start instance quite
often producing instances that completely wrong, e.g. if
start instance = 5, instance divisor = 2, then on the first
iteration it should be:
5 * stride, not (5/2) * stride as we'd have currently, and if
start instance = 1, instance divisor = 3, then on the first
iteration it should be:
1 * stride, not 0 as we'd have.
This fixes it and adjusts all the code to the changes.

Signed-off-by: Zack Rusin <zackr@vmware.com>
11 years agodraw: fix incorrect clipper invocation statistics
Zack Rusin [Thu, 27 Jun 2013 19:24:52 +0000 (15:24 -0400)]
draw: fix incorrect clipper invocation statistics

clipper invocations are computed earlier (of course
before the emittion) so this code was adding bogus
numbers to already computed clipper invocations.

Signed-off-by: Zack Rusin <zackr@vmware.com>
11 years agodraw/gallivm: export overflow arithmetic to its own file
Zack Rusin [Thu, 27 Jun 2013 19:23:21 +0000 (15:23 -0400)]
draw/gallivm: export overflow arithmetic to its own file

We'll be reusing this code so lets put it in a common file
and use it in the draw module.

Signed-off-by: Zack Rusin <zackr@vmware.com>
11 years agodraw: check for integer overflows in instance computation
Zack Rusin [Tue, 25 Jun 2013 21:01:14 +0000 (17:01 -0400)]
draw: check for integer overflows in instance computation

Integers could easily overflow is the starting instance
was large enough. Instead of letting bogus counts through
set the instance to max if it overflown and let our
regular buffer overflow computation handle it.

Signed-off-by: Zack Rusin <zackr@vmware.com>
11 years agodraw: check for an integer overflow when computing stride
Zack Rusin [Tue, 25 Jun 2013 20:14:06 +0000 (16:14 -0400)]
draw: check for an integer overflow when computing stride

Our buffer overflow arithmetic was susceptible to integer
overflows which was the buffer overflow logic to break.
Lets use the llvm overflow intrinsics to check for integer
overflows while computing the stride/needed buffer size.

Signed-off-by: Zack Rusin <zackr@vmware.com>
11 years agodraw: account for elem size when computing overflow
Zack Rusin [Tue, 25 Jun 2013 17:54:47 +0000 (13:54 -0400)]
draw: account for elem size when computing overflow

We weren't taking into account the size of element
that is to be fetched, which meant that it was possible
to overflow the buffer reads if the stride was very
close to the end of the buffer, e.g. stride = 3, buffer
size = 4, and the element to be read = 4. This should
be properly detected as an overflow.

Signed-off-by: Zack Rusin <zackr@vmware.com>
11 years agoi965: Initialize brw_blorp_const_color_program member variables.
Vinson Lee [Fri, 28 Jun 2013 05:40:20 +0000 (22:40 -0700)]
i965: Initialize brw_blorp_const_color_program member variables.

Fixes "Uninitialized scalar field" defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agoeglplatform: use unsigned long instead of 32-bit ints in generic platform
Ross Burton [Thu, 27 Jun 2013 11:35:08 +0000 (12:35 +0100)]
eglplatform: use unsigned long instead of 32-bit ints in generic platform

In the generic Unix case use the "unsigned long" type instead of 32-bit
integers so that the type sizes are consistant on 64-bit machines between X11
and not-X11.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agobuild: fix EGL build when no X11 headers are present
Ross Burton [Thu, 27 Jun 2013 11:35:07 +0000 (12:35 +0100)]
build: fix EGL build when no X11 headers are present

eglplatform.h defaults to X11 on Unix unless told otherwise, so if we're doing a
build without any X11 support tell it so that we don't try including headers
that don't exist.

Also set GL_PC_FLAGS so that the definition is in egl.pc, so that applications
using EGL don't try to pull in X11 headers on systems where EGL was configured
without X11 support.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64959
Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agotools/trace: Return dummy fence object to silence warnings.
José Fonseca [Mon, 1 Jul 2013 11:06:37 +0000 (12:06 +0100)]
tools/trace: Return dummy fence object to silence warnings.

11 years agotools/trace: Don't crash if a trace has no timing information.
José Fonseca [Mon, 1 Jul 2013 11:05:57 +0000 (12:05 +0100)]
tools/trace: Don't crash if a trace has no timing information.

11 years agoscons: Fix dependencies of enums.c and api_exec.c.
José Fonseca [Mon, 1 Jul 2013 11:04:59 +0000 (12:04 +0100)]
scons: Fix dependencies of enums.c and api_exec.c.

11 years agonvc0: allow frame dropping in h264
Maarten Lankhorst [Mon, 1 Jul 2013 06:47:49 +0000 (08:47 +0200)]
nvc0: allow frame dropping in h264

The only reason the checks existed were paranoia, when I first
wrote the code I wasn't sure it was correct. Now that I am,
the asserts triggered when XBMC was dropping frames, so remove it.

NOTE: This is a candidate for the 9.1 branch.

11 years agor300g/compiler: Prevent regalloc from swizzling texture operands v2
Tom Stellard [Mon, 20 May 2013 15:05:03 +0000 (08:05 -0700)]
r300g/compiler: Prevent regalloc from swizzling texture operands v2

https://bugs.freedesktop.org/show_bug.cgi?id=63520

NOTE: This is a candidate for the stable branches.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agor300g/compiler/tests: Add an assembly parser
Tom Stellard [Mon, 11 Mar 2013 00:55:26 +0000 (20:55 -0400)]
r300g/compiler/tests: Add an assembly parser

The assembly parser can be used to load r300 assembly dumps
and run them through any of the r300 compiler passes.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agor300g: Fix make check
Tom Stellard [Thu, 16 May 2013 16:33:21 +0000 (18:33 +0200)]
r300g: Fix make check

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
11 years agor600g: implement fast color clears for MSAA on evergreen+
Grigori Goronzy [Tue, 11 Jun 2013 22:04:01 +0000 (00:04 +0200)]
r600g: implement fast color clears for MSAA on evergreen+

Allows MSAA colorbuffers, which have a CMASK automatically and don't
need any further special handling, to be fast cleared. Instead
of clearing the buffer, set the clear color and the CMASK to the
cleared state.

Fast clear is used only when all bound colorbuffers fulfill certain
conditions: a CMASK is required, we have to be able to create a clear
color value for the format and the texture mustn't contain multiple
images. Technically, it should be possible to support array textures
and cubemaps if all images are attached to the framebuffer,
but this does not appear to be common.

v2: fix fast clear check
v3: Marek: - disable fast clear with 128-bit formats, which are unsupported
           - set tex->dirty_level_mask in r600_clear, so that the driver knows
             the resource must be decompressed/expanded
           - return early from r600_clear if there's nothing else to do

Signed-off-by: Marek Olšák <maraeo@gmail.com>
11 years agor600g/compute: disable unused colorbuffer slots
Marek Olšák [Mon, 24 Jun 2013 01:04:58 +0000 (03:04 +0200)]
r600g/compute: disable unused colorbuffer slots

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
11 years agost/mesa: handle SNORM formats in generic CopyPixels path
Marek Olšák [Thu, 6 Jun 2013 11:45:24 +0000 (13:45 +0200)]
st/mesa: handle SNORM formats in generic CopyPixels path

v2: check desc->is_mixed in util_format_is_snorm

11 years agoi965: NULL check depth_mt to quiet static analysis.
Matt Turner [Thu, 27 Jun 2013 18:18:36 +0000 (11:18 -0700)]
i965: NULL check depth_mt to quiet static analysis.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
11 years agollvmpipe: fix timer query if there's no bins
Roland Scheidegger [Fri, 28 Jun 2013 14:53:46 +0000 (16:53 +0200)]
llvmpipe: fix timer query if there's no bins

b04a295a4a0cd2defe352b3193b5fa79ca8fc9fc removed seemingly unnecessary
code in get_query. Turns out this code could in fact be reached - while
timestamps are always binned, if there are no bins (which happens if fb
size is 0) then the rasterization query code filling this in is still
never executed.
So fix this up by filling in some timestamp, but do it at EndQuery time
not GetQuery time which should be more appropriate.
Makes piglit arb_timer_query-timestamp-get happy again.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
11 years agoclover: Don't segfault when compiling a program with no kernel
Tom Stellard [Thu, 6 Jun 2013 00:05:43 +0000 (17:05 -0700)]
clover: Don't segfault when compiling a program with no kernel

11 years agomesa: Remove unused allow_large_textures driconf from classic drivers.
Eric Anholt [Wed, 26 Jun 2013 19:55:32 +0000 (12:55 -0700)]
mesa: Remove unused allow_large_textures driconf from classic drivers.

This option hasn't been used since the introduction of DRI2.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove GLES 3.0 sRGB workaround.
Kenneth Graunke [Fri, 21 Jun 2013 22:55:32 +0000 (15:55 -0700)]
i915: Remove GLES 3.0 sRGB workaround.

Gen3 doesn't support GLES 3.0, so there's no need for it.

Acked-by: Eric Anholt <eric@anholt.net>
11 years agoi965: Remove is_945.
Kenneth Graunke [Fri, 21 Jun 2013 22:52:43 +0000 (15:52 -0700)]
i965: Remove is_945.

Only relevant on Gen3.

Acked-by: Eric Anholt <eric@anholt.net>
11 years agoi965: Delete hw_stencil flag.
Kenneth Graunke [Fri, 21 Jun 2013 22:34:20 +0000 (15:34 -0700)]
i965: Delete hw_stencil flag.

This was only used by i915.

Acked-by: Eric Anholt <eric@anholt.net>
11 years agoi965: Remove hw_stipple flag.
Kenneth Graunke [Fri, 21 Jun 2013 22:33:45 +0000 (15:33 -0700)]
i965: Remove hw_stipple flag.

This was only used by i915.

Acked-by: Eric Anholt <eric@anholt.net>
11 years agoi965: Remove use_early_z option.
Kenneth Graunke [Fri, 21 Jun 2013 22:22:27 +0000 (15:22 -0700)]
i965: Remove use_early_z option.

This was only used by i965+.

v2: Also remove the option from the driconf list. (change by anholt)

Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agoi965: Remove unused SUBPIXEL_* macros.
Kenneth Graunke [Fri, 21 Jun 2013 22:19:34 +0000 (15:19 -0700)]
i965: Remove unused SUBPIXEL_* macros.

Acked-by: Eric Anholt <eric@anholt.net>
11 years agoi965: Remove redundant Gen3 PCI IDs.
Kenneth Graunke [Fri, 21 Jun 2013 22:18:46 +0000 (15:18 -0700)]
i965: Remove redundant Gen3 PCI IDs.

Acked-by: Eric Anholt <eric@anholt.net>
11 years agointel: Remove unused INTEL_MAX_FIXUP macro.
Kenneth Graunke [Fri, 21 Jun 2013 22:18:29 +0000 (15:18 -0700)]
intel: Remove unused INTEL_MAX_FIXUP macro.

v2: Remove it from i915, too (change by anholt)

Acked-by: Eric Anholt <eric@anholt.net>
11 years agoi965: Drop i915 register/instruction definitions.
Eric Anholt [Fri, 21 Jun 2013 18:23:49 +0000 (11:23 -0700)]
i965: Drop i915 register/instruction definitions.

v2: Remove unused DV_PF_* macros, too. (change by Ken)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop code for calling the empty brw_update_draw_buffers() hook.
Eric Anholt [Fri, 21 Jun 2013 18:08:34 +0000 (11:08 -0700)]
i965: Drop code for calling the empty brw_update_draw_buffers() hook.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop dead i915 blend state code.
Eric Anholt [Fri, 21 Jun 2013 17:02:49 +0000 (10:02 -0700)]
i965: Drop dead i915 blend state code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop i915-specific blit clear code.
Eric Anholt [Fri, 21 Jun 2013 16:58:59 +0000 (09:58 -0700)]
i965: Drop i915-specific blit clear code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop the system-memory VBO support for i915.
Eric Anholt [Fri, 21 Jun 2013 16:57:12 +0000 (09:57 -0700)]
i965: Drop the system-memory VBO support for i915.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop i915 swtnl code.
Eric Anholt [Fri, 21 Jun 2013 16:54:58 +0000 (09:54 -0700)]
i965: Drop i915 swtnl code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop i915-specific vtbl entries.
Eric Anholt [Fri, 21 Jun 2013 16:47:32 +0000 (09:47 -0700)]
i965: Drop i915-specific vtbl entries.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop swtnl fallback code for i915.
Eric Anholt [Fri, 21 Jun 2013 16:26:01 +0000 (09:26 -0700)]
i965: Drop swtnl fallback code for i915.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop i915 code from intel_screen.
Eric Anholt [Fri, 21 Jun 2013 16:22:39 +0000 (09:22 -0700)]
i965: Drop i915 code from intel_screen.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop #ifdef I915 code.
Eric Anholt [Thu, 20 Jun 2013 23:32:20 +0000 (16:32 -0700)]
i965: Drop #ifdef I915 code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Drop code checking for gen <= 3.
Eric Anholt [Thu, 20 Jun 2013 23:10:43 +0000 (16:10 -0700)]
i965: Drop code checking for gen <= 3.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove a duplicated set of PCI IDs.
Eric Anholt [Thu, 20 Jun 2013 23:03:08 +0000 (16:03 -0700)]
i915: Remove a duplicated set of PCI IDs.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove various remaining dead code.
Eric Anholt [Thu, 20 Jun 2013 22:47:11 +0000 (15:47 -0700)]
i915: Remove various remaining dead code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove dead debug flags.
Eric Anholt [Thu, 20 Jun 2013 22:58:25 +0000 (15:58 -0700)]
i915: Remove dead debug flags.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove state batch emit support.
Eric Anholt [Thu, 20 Jun 2013 22:53:23 +0000 (15:53 -0700)]
i915: Remove state batch emit support.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Drop unused register #defines from the shared reg file.
Eric Anholt [Thu, 20 Jun 2013 22:41:24 +0000 (15:41 -0700)]
i915: Drop unused register #defines from the shared reg file.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Drop 965+ GL version setup.
Eric Anholt [Thu, 20 Jun 2013 22:27:21 +0000 (15:27 -0700)]
i915: Drop 965+ GL version setup.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove gen6+ batchbuffer support.
Eric Anholt [Thu, 20 Jun 2013 22:18:05 +0000 (15:18 -0700)]
i915: Remove gen6+ batchbuffer support.

While i915 does have hardware contexts in hardware, we don't expect there
to ever be SW support for it (given that support hasn't even made it back
to gen5 or gen4).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Drop chipset detection code for 965+ chipsets.
Eric Anholt [Thu, 20 Jun 2013 22:07:18 +0000 (15:07 -0700)]
i915: Drop chipset detection code for 965+ chipsets.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Drop context fields specific to 965+ chipsets.
Eric Anholt [Thu, 20 Jun 2013 22:04:54 +0000 (15:04 -0700)]
i915: Drop context fields specific to 965+ chipsets.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Drop all has_llc code.
Eric Anholt [Thu, 20 Jun 2013 22:03:19 +0000 (15:03 -0700)]
i915: Drop all has_llc code.

i915 never has llc.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove the remainder of the batchbuffer caching.
Eric Anholt [Thu, 20 Jun 2013 22:00:44 +0000 (15:00 -0700)]
i915: Remove the remainder of the batchbuffer caching.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove miscellanous uncalled gen4 code from formerly shared files.
Eric Anholt [Thu, 20 Jun 2013 19:09:27 +0000 (12:09 -0700)]
i915: Remove miscellanous uncalled gen4 code from formerly shared files.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove most of the code under gen >= 4 checks.
Eric Anholt [Thu, 20 Jun 2013 19:08:32 +0000 (12:08 -0700)]
i915: Remove most of the code under gen >= 4 checks.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove fake ETC support that only existed on gen4+
Eric Anholt [Thu, 20 Jun 2013 18:58:25 +0000 (11:58 -0700)]
i915: Remove fake ETC support that only existed on gen4+

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove separate stencil code.
Eric Anholt [Thu, 20 Jun 2013 18:53:27 +0000 (11:53 -0700)]
i915: Remove separate stencil code.

This was formerly-shared code for supporting gen5+.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove the I915 macro from the formerly shared code.
Eric Anholt [Thu, 20 Jun 2013 18:43:48 +0000 (11:43 -0700)]
i915: Remove the I915 macro from the formerly shared code.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove all the MSAA support code.
Eric Anholt [Thu, 20 Jun 2013 18:25:58 +0000 (11:25 -0700)]
i915: Remove all the MSAA support code.

This hardware doesn't have MSAA support, so this code is all a waste for it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove all the HiZ code from i915.
Eric Anholt [Thu, 20 Jun 2013 17:04:26 +0000 (10:04 -0700)]
i915: Remove all the HiZ code from i915.

v2: Remove extra struct forward declaration (change by Ken)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa: GL_EXT_shadow_funcs is not optional with GL_ARB_shadow
Ian Romanick [Fri, 28 Jun 2013 01:20:34 +0000 (18:20 -0700)]
mesa: GL_EXT_shadow_funcs is not optional with GL_ARB_shadow

Every driver left in Mesa that enables one also enables the other.
There's no reason to let it be optional.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: GL_ARB_texture_storage_multisample is not optional with GL_ARB_texture_multisample
Ian Romanick [Fri, 28 Jun 2013 01:20:33 +0000 (18:20 -0700)]
mesa: GL_ARB_texture_storage_multisample is not optional with GL_ARB_texture_multisample

In Mesa, this extension is implemented purely in software.  Drivers may
*optionally* provide optimized paths.  If a driver enables,
GL_ARB_texture_multisample, it gets GL_ARB_texture_storage_multisample
for free.

NOTE: This has the side effect of enabling the extension in Gallium
drivers that enable GL_ARB_texture_multisample.

v2 (Ken): Still prevent multisample texture targets in TexParameter for
implementations that don't support multisampling.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: GL_ARB_texture_storage is not optional
Ian Romanick [Fri, 28 Jun 2013 01:20:32 +0000 (18:20 -0700)]
mesa: GL_ARB_texture_storage is not optional

In Mesa, this extension is implemented purely in software.  Drivers may
*optionally* provide optimized paths.

NOTE: This has the side effect of enabling the extension in the radeon,
r200, and nouveau drivers.

v2: Minor whitespace tidying (suggested by Brian).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: GL_ARB_shading_language_100 is not optional
Ian Romanick [Fri, 28 Jun 2013 01:20:31 +0000 (18:20 -0700)]
mesa: GL_ARB_shading_language_100 is not optional

This extension just provides some of the most basic software framework
for GLSL.  Without GL_ARB_vertex_shader or GL_ARB_fragment_shader,
applications still cannot use GLSL.  There's no value in
conditionalizing support for this extension.

NOTE: This has the side effect of enabling the extension in the radeon,
r200, and nouveau drivers.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: GL_ARB_shader_objects is not optional
Ian Romanick [Fri, 28 Jun 2013 01:20:30 +0000 (18:20 -0700)]
mesa: GL_ARB_shader_objects is not optional

This extension just provides some of the most basic software framework
for GLSL.  Without GL_ARB_vertex_shader or GL_ARB_fragment_shader,
applications still cannot use GLSL.  There's no value in
conditionalizing support for this extension.

NOTE: This has the side effect of enabling the extension in the radeon,
r200, and nouveau drivers.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: GL_NV_blend_square is not optional
Ian Romanick [Fri, 28 Jun 2013 01:20:29 +0000 (18:20 -0700)]
mesa: GL_NV_blend_square is not optional

Every driver left in Mesa enables this extension all the time.  There's
no reason to let it be optional.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: GL_EXT_fog_coord is not optional
Ian Romanick [Fri, 28 Jun 2013 01:20:28 +0000 (18:20 -0700)]
mesa: GL_EXT_fog_coord is not optional

Every driver left in Mesa enables this extension all the time.  There's
no reason to let it be optional.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: GL_EXT_secondary_color is not optional
Ian Romanick [Fri, 28 Jun 2013 01:20:27 +0000 (18:20 -0700)]
mesa: GL_EXT_secondary_color is not optional

Every driver left in Mesa enables this extension all the time.  There's
no reason to let it be optional.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: GL_EXT_framebuffer_object is not optional
Ian Romanick [Fri, 28 Jun 2013 01:20:26 +0000 (18:20 -0700)]
mesa: GL_EXT_framebuffer_object is not optional

Every driver left in Mesa enables this extension all the time.  There's
no reason to let it be optional.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: Remove GL_MESA_resize_buffers
Ian Romanick [Fri, 28 Jun 2013 01:20:25 +0000 (18:20 -0700)]
mesa: Remove GL_MESA_resize_buffers

Commit bab755a made the implementation a no-op, and it was only ever
enabled by software rasterizers.

v2: Move the spec into docs/specs/OLD since it's now obsolete
    (squashed patch from Andreas Boll)

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: Remove _mesa_{enable, disable}_extension and _mesa_extension_is_enabled
Ian Romanick [Fri, 28 Jun 2013 01:20:24 +0000 (18:20 -0700)]
mesa: Remove _mesa_{enable, disable}_extension and _mesa_extension_is_enabled

They're not used anywhere.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: Just set extension flags instead of calling _mesa_enable_extension
Ian Romanick [Fri, 28 Jun 2013 01:20:23 +0000 (18:20 -0700)]
mesa: Just set extension flags instead of calling _mesa_enable_extension

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agomesa: Remove _mesa_enable_._._extensions functions
Ian Romanick [Fri, 28 Jun 2013 01:20:22 +0000 (18:20 -0700)]
mesa: Remove _mesa_enable_._._extensions functions

After the preceeding commits, they are not used.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agoswrast: Don't call _mesa_enable_._._extensions and _mesa_enable_sw_extensions
Ian Romanick [Fri, 28 Jun 2013 01:20:21 +0000 (18:20 -0700)]
swrast: Don't call _mesa_enable_._._extensions and _mesa_enable_sw_extensions

_mesa_enable_sw_extensions enables all the extensions (and more) that
the others enable.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agoosmesa: Don't call _mesa_enable_._._extensions and _mesa_enable_sw_extensions
Ian Romanick [Fri, 28 Jun 2013 01:20:20 +0000 (18:20 -0700)]
osmesa: Don't call _mesa_enable_._._extensions and _mesa_enable_sw_extensions

_mesa_enable_sw_extensions enables all the extensions (and more) that
the others enable.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agowmesa: Don't call _mesa_enable_._._extensions and _mesa_enable_sw_extensions
Ian Romanick [Fri, 28 Jun 2013 01:20:19 +0000 (18:20 -0700)]
wmesa: Don't call _mesa_enable_._._extensions and _mesa_enable_sw_extensions

_mesa_enable_sw_extensions enables all the extensions (and more) that
the others enable.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agox11: Don't call _mesa_enable_._._extensions and _mesa_enable_sw_extensions
Ian Romanick [Fri, 28 Jun 2013 01:20:18 +0000 (18:20 -0700)]
x11: Don't call _mesa_enable_._._extensions and _mesa_enable_sw_extensions

_mesa_enable_sw_extensions enables all the extensions (and more) that
the others enable.  Also, don't duplicate the DXTn checks.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agoi965: Merge the two GEN >= 6 extension enable blocks
Ian Romanick [Fri, 28 Jun 2013 01:20:17 +0000 (18:20 -0700)]
i965: Merge the two GEN >= 6 extension enable blocks

There's no reason for these blocks to be separate.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Move GEN >= 4 extensions into the "always on" list
Ian Romanick [Fri, 28 Jun 2013 01:20:16 +0000 (18:20 -0700)]
i965: Move GEN >= 4 extensions into the "always on" list

This copy of the source file is only used for GEN >= 4, so extensions
that are enabled for GEN >= 4 are always enabled.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Move GEN >= 3 extensions into the "always on" list
Ian Romanick [Fri, 28 Jun 2013 01:20:15 +0000 (18:20 -0700)]
i965: Move GEN >= 3 extensions into the "always on" list

This copy of the source file is only used for GEN >= 4, so extensions
that are enabled for GEN >= 3 are always enabled.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi915: Remove GEN >= 4 extension support
Ian Romanick [Fri, 28 Jun 2013 01:20:14 +0000 (18:20 -0700)]
i915: Remove GEN >= 4 extension support

This copy of the source file is only used for GEN <= 3, so remove the
dead code.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Split surface format code into a new file (brw_surface_formats.c).
Kenneth Graunke [Wed, 26 Jun 2013 18:58:38 +0000 (11:58 -0700)]
i965: Split surface format code into a new file (brw_surface_formats.c).

brw_wm_surface_state.c has gotten rather large and unwieldy.  At this
point, it consists of two separate portions:

1. Surface format code

   This includes the giant table of surface formats and what features
   they support on each generation, as well as the code to translate
   between Mesa formats and hardware formats.

   This is used across all generations.

2. Binding table (SURFACE_STATE) related code.

   This is the code to generate SURFACE_STATE entries for renderbuffers,
   textures, transform feedback buffers, constant buffers, and so on, as
   well as the code to assemble them into binding tables.

   This is only used on Gen4-6; gen7_surface_state.c has Gen7+ code.

Since the two are logically separate, and one is reused on every
generation while the other is not, it makes a lot of sense to split
them out.  It should also make finding code easier.

No code is changed by this patch.  I simply copied the file then deleted
portions of both.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agoradeonsi: add kabini pci ids
Alex Deucher [Fri, 25 Jan 2013 00:46:05 +0000 (19:46 -0500)]
radeonsi: add kabini pci ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: add bonaire pci ids
Alex Deucher [Fri, 7 Jun 2013 18:09:20 +0000 (14:09 -0400)]
radeonsi: add bonaire pci ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: disable 2D tiling on CIK for now
Alex Deucher [Fri, 3 May 2013 21:12:04 +0000 (17:12 -0400)]
radeonsi: disable 2D tiling on CIK for now

Causes GPU hangs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: add llvm processor names for CIK
Alex Deucher [Fri, 7 Jun 2013 18:08:25 +0000 (14:08 -0400)]
radeonsi: add llvm processor names for CIK

Requires updated llvm.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: emit PA_SC_RASTER_CONFIG[_1] on cik
Alex Deucher [Fri, 7 Jun 2013 18:07:10 +0000 (14:07 -0400)]
radeonsi: emit PA_SC_RASTER_CONFIG[_1] on cik

Use the golden values for each asic.

Todo: update Kabini and Kaveri.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: PA_CL_ENHANCE is privileged on CIK
Alex Deucher [Fri, 16 Nov 2012 04:05:59 +0000 (23:05 -0500)]
radeonsi: PA_CL_ENHANCE is privileged on CIK

Needs to be and is set by the kernel.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: update surface sync packet emit for CIK
Alex Deucher [Mon, 1 Oct 2012 20:37:54 +0000 (16:37 -0400)]
radeonsi: update surface sync packet emit for CIK

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: store chip class in the pm4 struct
Alex Deucher [Fri, 7 Jun 2013 18:04:58 +0000 (14:04 -0400)]
radeonsi: store chip class in the pm4 struct

Will be used for asic specific pm4 behavior.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: properly handle DB tiling setup on CIK
Alex Deucher [Thu, 2 May 2013 16:28:38 +0000 (12:28 -0400)]
radeonsi: properly handle DB tiling setup on CIK

On CIK, DB switches back to using per-surface tiling
parameters rather than the tile index used on SI.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: emit additional shader pgm rsrc registers for CIK
Alex Deucher [Fri, 28 Sep 2012 22:31:16 +0000 (18:31 -0400)]
radeonsi: emit additional shader pgm rsrc registers for CIK

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeonsi: emit TA_BC_BASE_ADDR_HI for border color on CIK
Alex Deucher [Fri, 9 Nov 2012 00:00:59 +0000 (19:00 -0500)]
radeonsi: emit TA_BC_BASE_ADDR_HI for border color on CIK

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>