Commit Graph

51849 Commits

Author SHA1 Message Date
Jordan Justen 1fea3df6f4 intel: add support for using API_OPENGL_CORE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-30 16:25:56 -07:00
Jordan Justen 0f099df567 meta: add support for using API_OPENGL_CORE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-30 16:25:56 -07:00
Jordan Justen 4aecd8f031 glsl: add support for using API_OPENGL_CORE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-30 16:25:56 -07:00
Jordan Justen 09714c09a4 mesa: add support for using API_OPENGL_CORE
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-30 16:18:57 -07:00
Jordan Justen 3d284dcba6 mesa: add api check functions
These functions make it easier to check for multiple API types.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-30 16:18:57 -07:00
Jordan Justen 1c29b73f4d mesa: add API_OPENGL_CORE api
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-07-30 16:18:57 -07:00
Ian Romanick d3de40742f glsl: Fix ir_last_opcode value.
Now that ir_quadop_vector exists, ir_last_binop and ir_last_opcode are
no longer the same.  Only one place currently uses this enumeration, and
already handles ir_quadop_vector correctly.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Olivier Galibert <galibert@pobox.com>
2012-07-30 15:15:48 -07:00
Ian Romanick 9d998a2a59 glsl: Request an Nx1 type instance in ir_quadop_vector lowering pass.
No types have 0 columns.  The glsl_type::get_instance method contains

   if ((rows < 1) || (rows > 4) || (columns < 1) || (columns > 4))
      return error_type;

To get a vector, use columns = 1.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Olivier Galibert <galibert@pobox.com>
2012-07-30 15:14:34 -07:00
Kenneth Graunke 13cb99dc73 glsl: Make bvec and ivec types accessible without using get_instance.
It's more convenient to use shortcuts like glsl_type::bvec2_type than
the longwinded glsl_type::get_instance(GLSL_TYPE_BOOL, 2, 1).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Olivier Galibert <galibert@pobox.com>
2012-07-30 15:14:09 -07:00
Tom Stellard cd0949eb28 radeon/llvm: Cleanup AMDIL.h 2012-07-30 21:10:14 +00:00
Tom Stellard 2f921101c0 radeon/llvm: Rename all AMDIL* classes to AMDGPU* 2012-07-30 21:10:14 +00:00
Tom Stellard b72ab79d73 radeon/llvm: Merge AMDILSubtarget into AMDGPUSubtarget 2012-07-30 21:10:13 +00:00
Tom Stellard 27ae41c83d radeon/llvm: Merge AMDILTargetLowering class into AMDGPUTargetLowering 2012-07-30 21:10:13 +00:00
Tom Stellard c96490e3b5 radeon/llvm: Remove IL_cmp DAG node 2012-07-30 21:10:13 +00:00
Tom Stellard aece7970eb radeon/llvm: Cleanup and reorganize AMDIL .td files 2012-07-30 21:10:13 +00:00
Tom Stellard 0ce6e50601 radeon/llvm: Remove lowering code for unsupported features
e.g. function calls, load/store from stack
2012-07-30 21:10:08 +00:00
Tom Stellard caeaf43dad radeon/llvm: Remove AMDILVersion.td 2012-07-30 20:31:57 +00:00
Tom Stellard c3111eb639 radeon/llvm: Remove AMDILAlgorithms.tpp 2012-07-30 20:31:57 +00:00
Tom Stellard ac669c32c6 radeon/llvm: Merge AMDILInstrInfo.cpp into AMDGPUInstrInfo.cpp 2012-07-30 20:31:57 +00:00
Tom Stellard 3a0187b1b5 radeon/llvm: Merge AMDILRegisterInfo into AMDGPURegisterInfo 2012-07-30 20:31:57 +00:00
Tom Stellard 9c42fb6f26 radeon/llvm: Change the tablegen target from AMDIL to AMDGPU 2012-07-30 20:31:56 +00:00
Kenneth Graunke f56dfc3213 i965: Support MESA_FORMAT_SIGNED_RGBA_16.
The hardware supports this format with no known quirks, so we may as
well enable it.

Alpha blending is not supported until Sandybridge, but as far as I can
tell, OpenGL doesn't require alpha blending on SNORM formats.  Plus, we
already expose R8G8B8A8_SNORM which has a similar restriction.

Fixes 6 piglit texwrap-2D-*SNORM* cases,
gl-3.1/required-sized-texture-formats, and 10 oglconform snorm-textures
subcases

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-07-30 09:35:58 -07:00
Elvis Lee e7a4a2b18b gbm: Fix build for wayland include
backends/gbm_dri.c fails to find wayland-server.h.

Signed-off-by: Elvis Lee <kwangwoong.lee@lge.com>
2012-07-30 11:58:02 -04:00
Brian Paul b51be8786f mesa: fix _math_matrix_copy(), again
The matrix is 16 GLfloats in size.  Since from->inv is just a pointer (not
an array), sizeof(*from->inv) wasn't right.
2012-07-30 08:30:15 -06:00
Vinson Lee 502c10839e mesa: Fix wrong sizeof argument in _math_matrix_copy.
Fixes Coverity wrong sizeof argument defect.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2012-07-30 08:13:55 -06:00
Christian König 86490bc150 radeonsi: fix db and stencil setup v2
v2: fix tiling for small pitches, that finally makes
    glxgears and readPixSanity work

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-07-30 15:02:04 +02:00
Christian König 7dace3a3cf radeonsi: fix stencil op mapping
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-07-30 15:02:00 +02:00
Christian König ad15c8c0f1 radeonsi: fix assertion in si_bind_vs_sampler
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-07-30 15:01:55 +02:00
Christian König 1fb8ee62fa radeonsi: fix shader binding
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-07-30 15:01:51 +02:00
Christian König f18fd255cf radeonsi: fix dummy export in shaders v2
v2: add assertion for vertex shader

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-07-30 15:01:34 +02:00
Christian König b15e3ae5b4 radeonsi: fix vertex buffer and elements
Let's just use the T# descriptors until we get a fetch shader.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-07-30 14:45:32 +02:00
Christian König d51b9b70d5 radeonsi: fix shader size and handling
We should always upload the shader here.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-07-30 14:45:08 +02:00
Christian König fe41287ffa radeonsi: rename r600_resource to si_resource
Also split it into seperate header and add
some helper functions.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-07-30 14:44:38 +02:00
Kenneth Graunke dcf8754cce glcpp: Add a newline to expanded #line directives.
Otherwise, the preprocessor happily outputs

    #line 2 4 <your next line of code>

and the main compiler gets horribly confused and fails to compile.

This is not the right solution (line numbers in error messages will
likely be off-by-one in certain circumstances), but until Carl comes
up with a proper fix, this gets programs running again.

Fixes regressions in Regnum Online, Overgrowth, Piglit, and others since
commit aac78ce823.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51802
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51506
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41152
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-28 13:33:50 -07:00
Christoph Bumiller 5d5af7d359 gallium: specify resource_resolve destination via a pipe_surface
The format member of pipe_surface may differ from that of the
pipe_resource, which is used to communicate, for instance, whether
sRGB encode should be enabled in the resolve operation or not.

Fixes resolve to sRGB surfaces in mesa/st when GL_FRAMEBUFFER_SRGB
is disabled.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-07-28 14:58:18 +02:00
Christoph Bumiller 51e41a0d89 st/mesa: call update_renderbuffer_surface for sRGB renderbuffers, too
sRGBEnabled should affect both textures and renderbuffers, so we need
to check/update the pipe_surface format for both.

Fixes, for instance, rendering appearing too bright in wine applications
using sRGB multisample renderbuffers.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-07-28 13:14:30 +02:00
Christoph Bumiller acd66ec033 nv50: fix depth/stencil multisample memory storage types
Leftover from libdrm_nouveau v2 interface change.
2012-07-28 13:14:03 +02:00
Christoph Bumiller cd3d85b63d nv50: fix resource_resolve shader start offsets 2012-07-28 13:11:56 +02:00
Brian Paul f612e55e45 st/mesa: undo a couple static asserts
Hmm, gcc didn't catch these mistakes, but MSVC did.
2012-07-27 16:10:58 -06:00
Brian Paul 322a2938f3 st/mesa: use STATIC_ASSERT in a few places 2012-07-27 15:47:38 -06:00
Brian Paul 59c67f8116 mesa: whitespace, etc. fixes in program.h 2012-07-27 15:43:53 -06:00
Brian Paul 906febaf8b meta: fix glDrawPixels fallback test, stencil drawing
Remove the check for pixel transfer ops.  If any RGB/depth scale/bias
is in effect, it'll be applied in the glTexImage step.

If drawing stencil pixels we need to disable pixel transfer so that
alpha scale/bias are not applied to the stencil data.

These issues were spotted by Roland.

Fixes Blender performance issues reported in
http://bugs.freedesktop.org/show_bug.cgi?id=47375

NOTE: This is a candidate for the 8.0 branch.

Tested-by: Barto <mister.freeman@laposte.net>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2012-07-27 14:53:16 -06:00
Brian Paul a80b7407f3 radeon: fix 'sowftware' typo 2012-07-27 14:53:16 -06:00
Eric Anholt fbf86c7f0f i965/gen7: Reduce GT1 WM thread count according to updated BSpec.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>

https://bugs.freedesktop.org/show_bug.cgi?id=52382
2012-07-27 11:42:19 -07:00
Kenneth Graunke cbcf750d5f i965: Fix typo in shader channel select field name.
"chanel" isn't very searchable.  I can type, honest!

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-27 11:31:07 -07:00
Paul Berry ee9f6a34cc i965/msaa: Use MESA_FORMAT_R8 for MCS buffer.
No functional change.  This patch modifies intel_miptree_alloc_mcs to
allocate the 4x MCS buffer using MESA_FORMAT_R8 instead of
MESA_FORMAT_A8.  In principle it doesn't matter, since we only access
the buffer using MCS-specific hardware mechanisms, so all that's
important is to use a format with the correct size.  However,
MESA_FORMAT_A8 has enough unusual behaviours that it seems prudent to
avoid it.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-07-27 10:42:19 -07:00
Zou Nan hai 588881430a intel: increase wm thread number to 80 on gen6 GT2
It seems reset is not required for setting the max_wm_threads to 80
on gen6 GT2.

Increases performance in the Counter-Strike: Source video stress test
by 7.18% (n=5).

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Matt Turner <mattst88@gmail.com>
Acked-by: Eric Anholt <eric@anholt.net>
2012-07-27 10:32:17 -07:00
Tom Stellard fdd8df20e4 r600g: Emit dispatch state for compute directly to the cs
We no longer rely on an evergreen_compute_resource for emitting dispatch
state.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-07-27 17:08:09 +00:00
Tom Stellard dc0b8a4628 r600g: Initialize VGT_PRIMITIVE_TYPE in the start_cs_cmd atom
The value of this register will always be DI_PT_POINTLIST for compute
shaders.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-07-27 17:08:09 +00:00
Tom Stellard d3b0130491 r600g: Atomize compute shader state
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-07-27 17:08:09 +00:00