mesa.git
12 years agonv50: enable array textures
Christoph Bumiller [Tue, 24 Apr 2012 21:21:41 +0000 (23:21 +0200)]
nv50: enable array textures

12 years agosvga: specify 4-byte aligned vertex elements
Brian Paul [Mon, 30 Apr 2012 22:01:08 +0000 (16:01 -0600)]
svga: specify 4-byte aligned vertex elements

We haven't found a case where this is needed, but it would be prudent
for some hosts, per Jose.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agogallivm: fix comment typo
Brian Paul [Thu, 3 May 2012 23:00:37 +0000 (17:00 -0600)]
gallivm: fix comment typo

12 years agodocs: another viewperf bug
Brian Paul [Tue, 1 May 2012 21:49:31 +0000 (15:49 -0600)]
docs: another viewperf bug

12 years agomesa: do more teximage error checking for generic compressed formats
Brian Paul [Tue, 1 May 2012 20:46:04 +0000 (14:46 -0600)]
mesa: do more teximage error checking for generic compressed formats

When glTexImage or glCopyTexImage is called with internalFormat being a
generic compressed format (like GL_COMPRESSED_RGB) we need to do the same
error checks as for specific compressed formats.  In particular, check if
the texture target is compatible with the format.  None of the texture
compression formats we support so far work with GL_TEXTURE_1D, for example.

See also https://bugs.freedesktop.org/show_bug.cgi?id=49124

NOTE: This is a candidate for the 8.0 branch.

12 years agoscons: Do not build EGL on Solaris.
Vinson Lee [Tue, 1 May 2012 01:57:38 +0000 (18:57 -0700)]
scons: Do not build EGL on Solaris.

The current EGL headers do not support Solaris.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodarwin: Use ASL for logging
Jeremy Huddleston [Sun, 29 Apr 2012 06:19:42 +0000 (23:19 -0700)]
darwin: Use ASL for logging

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agodarwin: Make reported errors more user-friendly
Jeremy Huddleston [Sat, 28 Apr 2012 23:50:00 +0000 (16:50 -0700)]
darwin: Make reported errors more user-friendly

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agodarwin: Fix an error message
Jeremy Huddleston [Sun, 29 Apr 2012 07:27:03 +0000 (00:27 -0700)]
darwin: Fix an error message

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoegl_dri2: Fix out of tree builds with the wayland backend enabled
Robert Hooker [Wed, 2 May 2012 23:04:57 +0000 (19:04 -0400)]
egl_dri2: Fix out of tree builds with the wayland backend enabled

Otherwise it fails like so:

  CC     egl_dri2.lo
In file included from egl_dri2.h:40:0,
                 from egl_dri2.c:42:
../../../../../../src/egl/wayland/wayland-drm/wayland-drm.h:8:41:
fatal error: wayland-drm-server-protocol.h: No such file or directory
compilation terminated.

12 years agogbm: Add gbm_bo_write entry point
Kristian Høgsberg [Wed, 2 May 2012 19:30:13 +0000 (15:30 -0400)]
gbm: Add gbm_bo_write entry point

This new gbm entry point allows writing data into a gbm bo.  The bo has
to be created with the GBM_BO_USE_WRITE flag, and it's only required to
work for GBM_BO_USE_CURSOR_64X64 bos.

The gbm API is designed to be the glue layer between EGL and KMS, but there
was never a mechanism initialize a buffer suitable for use with KMS
hw cursors.  The hw cursor bo is typically not compatible with anything EGL
can render to, and thus there's no way to get data into such a bo.

gbm_bo_write() fills that gap while staying out of the efficient
cpu->gpu pixel transfer business.

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
12 years agor600g/llvm: Mask write of pred_inst in llvm_if()
Tom Stellard [Mon, 30 Apr 2012 14:18:41 +0000 (10:18 -0400)]
r600g/llvm: Mask write of pred_inst in llvm_if()

12 years agor600g/llvm: Lower ULT A, B, C to SETGT_UINT A, C, B
Tom Stellard [Fri, 27 Apr 2012 20:22:58 +0000 (16:22 -0400)]
r600g/llvm: Lower ULT A, B, C to SETGT_UINT A, C, B

12 years agor600g: Print integer values of literal constants in shader dumps
Tom Stellard [Fri, 27 Apr 2012 19:26:30 +0000 (15:26 -0400)]
r600g: Print integer values of literal constants in shader dumps

12 years agor600g: Add support for reading BREAK_LOGICALZ_i32 from bytestream
Tom Stellard [Fri, 27 Apr 2012 19:15:19 +0000 (15:15 -0400)]
r600g: Add support for reading BREAK_LOGICALZ_i32 from bytestream

12 years agor600g/llvm: Don't duplicate R600 intrinsics installed by LLVM
Tom Stellard [Tue, 24 Apr 2012 17:31:07 +0000 (13:31 -0400)]
r600g/llvm: Don't duplicate R600 intrinsics installed by LLVM

At this point, in order for OpenCL to work correctly with r600g, OpenCL
specific intrinsics need to be defined in the LLVM tree.  So, we need
to check for these intrinsics in the LLVM include directory to make sure
not to re-define them.

12 years agor600g: Fix the evergreen offset/end register definitions
Tom Stellard [Wed, 2 May 2012 18:51:04 +0000 (14:51 -0400)]
r600g: Fix the evergreen offset/end register definitions

12 years agoglsl: report errors via GL_ARB_debug_output
Dylan Noblesmith [Mon, 2 Apr 2012 16:26:05 +0000 (16:26 +0000)]
glsl: report errors via GL_ARB_debug_output

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglsl: add gl_context member
Dylan Noblesmith [Mon, 2 Apr 2012 16:14:31 +0000 (16:14 +0000)]
glsl: add gl_context member

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: add _mesa_shader_debug()
Dylan Noblesmith [Mon, 2 Apr 2012 16:11:11 +0000 (16:11 +0000)]
mesa: add _mesa_shader_debug()

This should be the one entrypoint libglsl needs
for GL_ARB_debug_output.

v2: added comments.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglsl: consolidate error/warning code
Dylan Noblesmith [Mon, 2 Apr 2012 15:39:38 +0000 (15:39 +0000)]
glsl: consolidate error/warning code

And lay the groundwork for GL_ARB_debug_output.

v2: Add descriptive comments.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoradeon/llvm: Fix MachineInstr dump
Tom Stellard [Wed, 2 May 2012 15:53:13 +0000 (11:53 -0400)]
radeon/llvm: Fix MachineInstr dump

12 years agor600g: fixed the bug with VTX fetches in TEX clauses for evergreen
Adam Rak [Tue, 17 Apr 2012 19:56:02 +0000 (15:56 -0400)]
r600g: fixed the bug with VTX fetches in TEX clauses for evergreen

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agowinsys/radeon: Get max_pipes from the kernel
Tom Stellard [Tue, 20 Mar 2012 17:33:37 +0000 (13:33 -0400)]
winsys/radeon: Get max_pipes from the kernel

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g: Add support for reading vertex fetches from bytestream
Tom Stellard [Wed, 29 Feb 2012 21:37:53 +0000 (16:37 -0500)]
r600g: Add support for reading vertex fetches from bytestream

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g: Add support for reading native instructions from the LLVM bytestream
Tom Stellard [Mon, 27 Feb 2012 20:47:34 +0000 (15:47 -0500)]
r600g: Add support for reading native instructions from the LLVM bytestream

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g: Add FC_NATIVE instruction
Tom Stellard [Mon, 27 Feb 2012 20:42:48 +0000 (15:42 -0500)]
r600g: Add FC_NATIVE instruction

This is a pseudo instruction that enables the LLVM backend to encode
instructions and pass it through r600_bytecode_build()

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g: bypass alpha for integer types (v2)
Dave Airlie [Sun, 22 Apr 2012 19:51:43 +0000 (20:51 +0100)]
r600g: bypass alpha for integer types (v2)

This moves the alpha test control to derived state and disables alpha
testing for integer fbs.

fbo-blending test in piglit gets further when we do this (not a pass
but less fail).

v2: drop the fb_sx_alpha_test_control

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogallivm: Use debug_printf in lp_build_printf.
José Fonseca [Wed, 25 Apr 2012 15:35:05 +0000 (16:35 +0100)]
gallivm: Use debug_printf in lp_build_printf.

So that its output can be seen on GUI window apps.

Tested-by: James Benton <jbenton@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
12 years agogallivm: Avoid LLVMAddGlobalMapping() in lp_bld_assert().
José Fonseca [Thu, 23 Feb 2012 09:48:08 +0000 (09:48 +0000)]
gallivm: Avoid LLVMAddGlobalMapping() in lp_bld_assert().

Brittle, complex, and unecesary. Just use function pointer constant.

12 years agogallivm: Add a lp_build_const_func_pointer() helper.
José Fonseca [Thu, 23 Feb 2012 09:21:26 +0000 (09:21 +0000)]
gallivm: Add a lp_build_const_func_pointer() helper.

To be reused in all places where we want to call C code.

12 years agogallivm: Cleanup/simplify lp_build_const_string_variable.
José Fonseca [Thu, 23 Feb 2012 09:44:41 +0000 (09:44 +0000)]
gallivm: Cleanup/simplify lp_build_const_string_variable.

- Move to lp_bld_const where it belongs
- Rename to lp_build_const_string
- take the length from the argument (and don't count the zero terminator twice)
- bitcast the constant to generic i8 *

12 years agogallivm: Added lp_build_const_mask_aos_swizzled
James Benton [Wed, 25 Apr 2012 10:19:07 +0000 (11:19 +0100)]
gallivm: Added lp_build_const_mask_aos_swizzled

Allows the creation of const aos masks which have the mask swizzled
to match the correct format.

Updated existing mask creation code to use the swizzled version where
necessary (tgsi register masks and llvmpipe aos blending).

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agogallivm: Move loop var declaration to beginning of scope.
José Fonseca [Wed, 25 Apr 2012 14:49:45 +0000 (15:49 +0100)]
gallivm: Move loop var declaration to beginning of scope.

12 years agogallivm: added a debug function which allows llvm to print vectors of 16 unsigned...
James Benton [Thu, 19 Apr 2012 17:13:14 +0000 (18:13 +0100)]
gallivm: added a debug function which allows llvm to print vectors of 16 unsigned ints

This is useful for debugging the linear llvm path as it handles pixels in this format

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agollvmpipe: add masking support to aos blend
James Benton [Thu, 19 Apr 2012 17:13:13 +0000 (18:13 +0100)]
llvmpipe: add masking support to aos blend

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agollvmpipe: Check when a shader does not satisfy 0 < imm < 1.
James Benton [Wed, 25 Apr 2012 10:19:06 +0000 (11:19 +0100)]
llvmpipe: Check when a shader does not satisfy 0 < imm < 1.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agogallivm: fixed memory leak in lp_build_tgsi_aos
James Benton [Tue, 1 May 2012 15:56:30 +0000 (16:56 +0100)]
gallivm: fixed memory leak in lp_build_tgsi_aos

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agollvmpipe: Added support for color masks in AoS blending.
James Benton [Wed, 18 Apr 2012 14:25:34 +0000 (15:25 +0100)]
llvmpipe: Added support for color masks in AoS blending.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agogallivm: added aligned pointer get/set
James Benton [Thu, 19 Apr 2012 12:13:17 +0000 (13:13 +0100)]
gallivm: added aligned pointer get/set

12 years agogallivm: llvm c-style for loops, allows us to create loops with conditions on entry...
James Benton [Thu, 19 Apr 2012 12:02:57 +0000 (13:02 +0100)]
gallivm: llvm c-style for loops, allows us to create loops with conditions on entry, rather than condition check on loop

12 years agodri/nv10-nv20: Add support for S3TC
Viktor Novotný [Tue, 1 May 2012 13:23:51 +0000 (15:23 +0200)]
dri/nv10-nv20: Add support for S3TC

Signed-off-by: Viktor Novotný <noviktor@seznam.cz>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
12 years agodri/nouveau: Add general support for compressed formats.
Viktor Novotný [Tue, 1 May 2012 13:23:50 +0000 (15:23 +0200)]
dri/nouveau: Add general support for compressed formats.

Signed-off-by: Viktor Novotný <noviktor@seznam.cz>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
12 years agoglsl: Remove some completed tasks from the old "TODO" file.
Kenneth Graunke [Tue, 1 May 2012 21:46:12 +0000 (14:46 -0700)]
glsl: Remove some completed tasks from the old "TODO" file.

12 years agoradeon/llvm: Fix build for updated LLVM 3.1 release branch
Tom Stellard [Tue, 1 May 2012 20:40:53 +0000 (16:40 -0400)]
radeon/llvm: Fix build for updated LLVM 3.1 release branch

12 years agosoftpipe: use any_swizzle() helper in sp_tex_sample.c
Brian Paul [Wed, 25 Apr 2012 16:50:06 +0000 (10:50 -0600)]
softpipe: use any_swizzle() helper in sp_tex_sample.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agosoftpipe: whitespace, comment clean-ups in sp_tex_sample.c
Brian Paul [Wed, 25 Apr 2012 16:46:09 +0000 (10:46 -0600)]
softpipe: whitespace, comment clean-ups in sp_tex_sample.c

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agosoftpipe: implement coord clamping for texel fetches (TXF)
Brian Paul [Wed, 25 Apr 2012 16:42:42 +0000 (10:42 -0600)]
softpipe: implement coord clamping for texel fetches (TXF)

The GL spec says out of bounds fetches produce undefined results.
Use clamping to avoid failed assertions or crashes.

Fixes failed assertion in https://bugs.freedesktop.org/show_bug.cgi?id=49125
but the test still fails.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoxlib: use _mesa_is_winsys/user_fbo() helpers
Brian Paul [Fri, 20 Apr 2012 13:58:59 +0000 (07:58 -0600)]
xlib: use _mesa_is_winsys/user_fbo() helpers

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agointel: use _mesa_is_winsys/user_fbo() helpers
Brian Paul [Fri, 20 Apr 2012 13:58:59 +0000 (07:58 -0600)]
intel: use _mesa_is_winsys/user_fbo() helpers

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agonouveau: use _mesa_is_winsys/user_fbo() helpers
Brian Paul [Fri, 20 Apr 2012 13:58:59 +0000 (07:58 -0600)]
nouveau: use _mesa_is_winsys/user_fbo() helpers

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoradeon: use _mesa_is_winsys/user_fbo() helpers
Brian Paul [Fri, 20 Apr 2012 13:58:59 +0000 (07:58 -0600)]
radeon: use _mesa_is_winsys/user_fbo() helpers

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeon/llvm: Add subtarget feature: DumpCode
Tom Stellard [Tue, 1 May 2012 17:08:26 +0000 (13:08 -0400)]
radeon/llvm: Add subtarget feature: DumpCode

With this feature enabled, the LLVM backend will dump the MachineIntrs
prior to emitting code.  The mesa env variable R600_DUMP_SHADERS will enable
this feature in the backend.

12 years agoglsl: Initialize member variable in ir_copy_propagation_elements_visitor.
Vinson Lee [Mon, 30 Apr 2012 07:57:56 +0000 (00:57 -0700)]
glsl: Initialize member variable in ir_copy_propagation_elements_visitor.

Fix uninitialized scalar field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agor600g/llvm: Remove unnecessary dynamic casts
Dragomir Ivanov [Sat, 28 Apr 2012 19:02:48 +0000 (22:02 +0300)]
r600g/llvm: Remove unnecessary dynamic casts

When the result of dynamic_cast is not checked, it can be replaced with
static_cast

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g/llvm: Add pattern for llvm.AMDGPU.kill v2
Dragomir Ivanov [Sun, 29 Apr 2012 18:25:23 +0000 (21:25 +0300)]
r600g/llvm: Add pattern for llvm.AMDGPU.kill v2

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g/llvm: Fix handling of MASK_WRITE instructions
Tom Stellard [Mon, 30 Apr 2012 20:11:27 +0000 (16:11 -0400)]
r600g/llvm: Fix handling of MASK_WRITE instructions

We can't delete MASK_WRITE instructions from the program, because this
will cause instructions being masked by MASK_WRITE to be marked dead and
then deleted in the dce pass.

12 years agoradeon/llvm: Use a custom emit function for TGSI_OPCODE_KIL
Tom Stellard [Mon, 30 Apr 2012 20:10:47 +0000 (16:10 -0400)]
radeon/llvm: Use a custom emit function for TGSI_OPCODE_KIL

12 years agoi965: Support Android RGBX8888 format for EGL generated images
Sean V Kelley [Tue, 24 Apr 2012 14:49:10 +0000 (07:49 -0700)]
i965: Support Android RGBX8888 format for EGL generated images

Enabled MESA_FORMAT_RGBX8888_REV for RGBX.  Android software
requires RGBX8888 format to be supported for software rendering.
That requires EGL to be capable of generating images from this
format.

Signed-off-by: Sean V Kelley <sean.v.kelley@linux.intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoegl/android: Add support for RGBX_8888 used in Android native buffers
Sean V Kelley [Tue, 24 Apr 2012 14:49:09 +0000 (07:49 -0700)]
egl/android: Add support for RGBX_8888 used in Android native buffers

Add new format __DRI_IMAGE_FORMAT_XBGR8888 to __DRI_IMAGE.
HAL_PIXEL_FORMAT_RGBX_8888 now maps to __DRI_IMAGE_FORMAT_XBGR8888.

Signed-off-by: Sean V Kelley <sean.v.kelley@linux.intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agoegl-fbdev: Fix compile-error by including errno.h
David Herrmann [Sun, 29 Apr 2012 09:53:16 +0000 (11:53 +0200)]
egl-fbdev: Fix compile-error by including errno.h

We use errno and EINVAL so include errno.h.

This patch introduced this bug:
http://cgit.freedesktop.org/mesa/mesa/commit/src/gallium/state_trackers/egl/fbdev/native_fbdev.c?id=b60120608f6ddf4098bc324363197c979ee04cb7

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Cc: Chia-I Wu <olv@lunarg.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Adam Jackson <ajax@redhat.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
12 years agointel: set dri_format field for all images
Ander Conselvan de Oliveira [Mon, 30 Apr 2012 09:32:45 +0000 (12:32 +0300)]
intel: set dri_format field for all images

Only images created with intel_create_image() had the field properly
set. Set it also on intel_dup_image(), intel_create_image_from_name()
and intel_create_image_from_renderbuffer().

12 years agointel: properly return the image format on intel_query_image
Ander Conselvan de Oliveira [Thu, 26 Apr 2012 13:21:19 +0000 (16:21 +0300)]
intel: properly return the image format on intel_query_image

12 years agogbm: add gbm_bo_get_device() function
Ander Conselvan de Oliveira [Mon, 30 Apr 2012 10:27:53 +0000 (13:27 +0300)]
gbm: add gbm_bo_get_device() function

12 years agogbm: update documentation to reflect current behavior
Ander Conselvan de Oliveira [Mon, 30 Apr 2012 10:27:52 +0000 (13:27 +0300)]
gbm: update documentation to reflect current behavior

12 years agogbm: add gbm_bo_get/set_user_data()
Ander Conselvan de Oliveira [Mon, 30 Apr 2012 10:27:51 +0000 (13:27 +0300)]
gbm: add gbm_bo_get/set_user_data()

This allows the user to associate some data to a gbm_bo and get a
callback when the bo is destroyed.

12 years agogbm: remove unused fields from gbm_dri_surface
Ander Conselvan de Oliveira [Mon, 30 Apr 2012 10:27:50 +0000 (13:27 +0300)]
gbm: remove unused fields from gbm_dri_surface

12 years agosvga: add cases for recently added PIPE_CAP queries
Brian Paul [Mon, 30 Apr 2012 16:37:33 +0000 (10:37 -0600)]
svga: add cases for recently added PIPE_CAP queries

12 years agomesa: reject immutable textures in glEGLImageTargetTexture2DOES()
Dylan Noblesmith [Sun, 29 Apr 2012 13:23:53 +0000 (13:23 +0000)]
mesa: reject immutable textures in glEGLImageTargetTexture2DOES()

GL_ARB_texture_storage says:

    The commands eglBindTexImage, wglBindTexImageARB, glXBindTexImageEXT or
    EGLImageTargetTexture2DOES are not permitted on an immutable-format
    texture.
    They will generate the following errors:
      - EGLImageTargetTexture2DOES: INVALID_OPERATION
      - eglBindTexImage: EGL_BAD_MATCH
      - wglBindTexImage: ERROR_INVALID_OPERATION
      - glXBindTexImageEXT: BadMatch

Fixing the EGL and GLX cases requires extending the DRI interface,
since setTexBuffer2 doesn't currently return any error information.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoscons: Fix build without llvm.
José Fonseca [Mon, 30 Apr 2012 06:47:01 +0000 (07:47 +0100)]
scons: Fix build without llvm.

radeonsi depends on llvm, so it must be disabled if llvm support is not enabled.

12 years agoscons: Parse = operator in source lists too.
José Fonseca [Sun, 29 Apr 2012 20:44:05 +0000 (21:44 +0100)]
scons: Parse = operator in source lists too.

Should fix the scons build.

12 years agonv50,nvc0: fix depth/stencil resolve
Christoph Bumiller [Sun, 29 Apr 2012 13:38:20 +0000 (15:38 +0200)]
nv50,nvc0: fix depth/stencil resolve

Cannot sample depth/stencil with a single view, and needed to use
different shader code for nve4.

12 years agonvc0/ir/opt: INTERP does not support JOIN
Christoph Bumiller [Sun, 29 Apr 2012 15:43:46 +0000 (17:43 +0200)]
nvc0/ir/opt: INTERP does not support JOIN

12 years agonv50/ir/opt: try to convert ABS(SUB) to SAD
Christoph Bumiller [Sat, 28 Apr 2012 15:06:59 +0000 (17:06 +0200)]
nv50/ir/opt: try to convert ABS(SUB) to SAD

12 years agonvc0/ir: try to use the optimal texture op mode
Christoph Bumiller [Fri, 27 Apr 2012 21:27:34 +0000 (23:27 +0200)]
nvc0/ir: try to use the optimal texture op mode

Don't really know what they are yet but for groups of textures, the
last one should use mode "p" and the others "t".

12 years agonvc0/ir: initial implementation of nve4 scheduling hints
Christoph Bumiller [Sun, 29 Apr 2012 15:59:06 +0000 (17:59 +0200)]
nvc0/ir: initial implementation of nve4 scheduling hints

12 years agonvc0/ir: implement better placement of texture barriers
Christoph Bumiller [Sun, 29 Apr 2012 15:56:57 +0000 (17:56 +0200)]
nvc0/ir: implement better placement of texture barriers

Put them before first uses instead of right after the texturing
instruction and cull unnecessary barriers.

12 years agonv50/ir/tgsi: fix handling of early RET
Christoph Bumiller [Sun, 29 Apr 2012 15:36:34 +0000 (17:36 +0200)]
nv50/ir/tgsi: fix handling of early RET

We have to actually emit RET, too, of course, not just the PRERET.

12 years agonvc0/ir/emit: fix emitTXQ 2nd src
Christoph Bumiller [Sat, 28 Apr 2012 16:04:05 +0000 (18:04 +0200)]
nvc0/ir/emit: fix emitTXQ 2nd src

12 years agonvc0/ir/target: integer ADD doesn't support ABS modifier
Christoph Bumiller [Sat, 28 Apr 2012 12:45:05 +0000 (14:45 +0200)]
nvc0/ir/target: integer ADD doesn't support ABS modifier

12 years agou_vbuf: unbind vertex buffers on destroy
Marek Olšák [Sun, 29 Apr 2012 15:41:37 +0000 (17:41 +0200)]
u_vbuf: unbind vertex buffers on destroy

12 years agou_blitter: fix resource leak
Marek Olšák [Sun, 29 Apr 2012 15:31:27 +0000 (17:31 +0200)]
u_blitter: fix resource leak

12 years agoradeonsi: make r600_buffer_transfer_unmap a no-op
Marek Olšák [Thu, 26 Apr 2012 10:12:33 +0000 (12:12 +0200)]
radeonsi: make r600_buffer_transfer_unmap a no-op

It's a no-op already in the winsys.

12 years agor600g: make r600_buffer_transfer_unmap a no-op
Marek Olšák [Thu, 26 Apr 2012 10:11:12 +0000 (12:11 +0200)]
r600g: make r600_buffer_transfer_unmap a no-op

It's a no-op already in the winsys.

12 years agor300g: make r300_buffer_transfer_unmap a no-op
Marek Olšák [Thu, 26 Apr 2012 10:10:06 +0000 (12:10 +0200)]
r300g: make r300_buffer_transfer_unmap a no-op

It's a no-op already in the winsys.

12 years agor300g: use u_default_transfer_inline_write
Marek Olšák [Thu, 26 Apr 2012 10:07:54 +0000 (12:07 +0200)]
r300g: use u_default_transfer_inline_write

12 years agoradeonsi: use u_default_transfer_inline_write
Marek Olšák [Thu, 26 Apr 2012 10:05:45 +0000 (12:05 +0200)]
radeonsi: use u_default_transfer_inline_write

12 years agowinsys/radeon: simplify buffer map/unmap functions
Marek Olšák [Thu, 26 Apr 2012 10:02:31 +0000 (12:02 +0200)]
winsys/radeon: simplify buffer map/unmap functions

The idea is not to use pb_map and pb_unmap wrappers, calling straight
into the winsys.

12 years agomesa: require GL_MAX_SAMPLES >= 4 for GL 3.0
Dylan Noblesmith [Sat, 21 Apr 2012 19:35:48 +0000 (19:35 +0000)]
mesa: require GL_MAX_SAMPLES >= 4 for GL 3.0

As noted in commit be4e46b21a60cfdc826bf89d1078df54966115b1,
this was missing before.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoautoconf: pass -Wall to automake
Dylan Noblesmith [Fri, 13 Apr 2012 20:36:39 +0000 (20:36 +0000)]
autoconf: pass -Wall to automake

And fix these warning that appear at autoreconf time:
"`:='-style assignments are not portable"

v2: Fix the recently-converted-to-automake r600.

12 years agoglsl: Remove unused member predicate from ir_dead_functions_visitor.
Vinson Lee [Fri, 27 Apr 2012 04:27:37 +0000 (21:27 -0700)]
glsl: Remove unused member predicate from ir_dead_functions_visitor.

Fix uninitialized pointer field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoi965/fs: Fix FB writes that tried to use the non-existent m16 register.
Kenneth Graunke [Tue, 24 Apr 2012 21:09:13 +0000 (14:09 -0700)]
i965/fs: Fix FB writes that tried to use the non-existent m16 register.

A little analysis shows that the worst-case value for "nr" is 17:
- base_mrf = 2                       ... 2
- header present (say gen == 5)      ... 4
- aa_dest_stencil_reg (stencil test) ... 5
- SIMD16 mode: += 4 * reg_width      ... 13
- source_depth_to_render_target      ... 15
- dest_depth_reg                     ... 17

This resulted in us setting base_mrf to 2 and mlen to 15.  In other
words, we'd try to use m2..m16.  But m16 doesn't exist pre-Gen6.  Also,
the instruction scheduler data structures use arrays of size 16, so this
would cause us to access them out of bounds.

While the debugger system routine may need m0 and m1, we don't use it
today, so the simplest solution is just to move base_mrf back to 1.
That way, our worst case message fits in m1..m15, which is legal.

An alternative would be to fail on SIMD16 in this case, but that seems
a bit unfortunate if there's no real need to reserve m0 and m1.

Fixes new piglit test shaders/depth-test-and-write on Ironlake.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48218
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoglsl: Remove unused member mem_ctx from ir_dead_functions_visitor.
Vinson Lee [Thu, 26 Apr 2012 05:49:12 +0000 (22:49 -0700)]
glsl: Remove unused member mem_ctx from ir_dead_functions_visitor.

Fix uninitialized pointer field defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agonv30: properly init window information
Ben Skeggs [Thu, 26 Apr 2012 23:26:13 +0000 (09:26 +1000)]
nv30: properly init window information

Should fix >2k rendering issues reported on nv4x.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agoradeonsi/llvm: Silence a warning
Tom Stellard [Wed, 25 Apr 2012 22:09:05 +0000 (18:09 -0400)]
radeonsi/llvm: Silence a warning

12 years agoradeon/llvm: Remove unused header files
Tom Stellard [Wed, 25 Apr 2012 16:20:51 +0000 (12:20 -0400)]
radeon/llvm: Remove unused header files

12 years agoradeon/llvm: Remove AMDILMachineFunctionInfo.cpp
Tom Stellard [Wed, 25 Apr 2012 16:16:27 +0000 (12:16 -0400)]
radeon/llvm: Remove AMDILMachineFunctionInfo.cpp

12 years agoradeon/llvm: Remove AMDILModuleInfo.cpp
Tom Stellard [Wed, 25 Apr 2012 15:55:01 +0000 (11:55 -0400)]
radeon/llvm: Remove AMDILModuleInfo.cpp

12 years agogallivm: Use lp_build_alloca instead of LLVMBuildAlloca on the loop limiter.
José Fonseca [Wed, 25 Apr 2012 15:30:06 +0000 (16:30 +0100)]
gallivm: Use lp_build_alloca instead of LLVMBuildAlloca on the loop limiter.

To ensure that the alloca is at the top of the function body, otherwise
LLVM will not eliminate them, causing stack misalignment on 32bits.

Reviewed-by: James Benton <jbenton@vmware.com>
12 years agoradeon/llvm: Remove AMDILELFWriterInfo.cpp
Tom Stellard [Wed, 25 Apr 2012 02:04:43 +0000 (22:04 -0400)]
radeon/llvm: Remove AMDILELFWriterInfo.cpp