mesa.git
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

12 years agoradeon/llvm: Remove AMDILLiteralManager.cpp
Tom Stellard [Wed, 25 Apr 2012 01:57:14 +0000 (21:57 -0400)]
radeon/llvm: Remove AMDILLiteralManager.cpp

12 years agoradeon/llvm: Remove AMDILInliner.cpp
Tom Stellard [Wed, 25 Apr 2012 01:52:22 +0000 (21:52 -0400)]
radeon/llvm: Remove AMDILInliner.cpp

12 years agoradeon/llvm: Remove AMDILBarrierDetect.cpp
Tom Stellard [Wed, 25 Apr 2012 01:48:14 +0000 (21:48 -0400)]
radeon/llvm: Remove AMDILBarrierDetect.cpp

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

12 years agoradeon/llvm: Remove GlobalManager and KernelManager
Tom Stellard [Wed, 25 Apr 2012 01:39:11 +0000 (21:39 -0400)]
radeon/llvm: Remove GlobalManager and KernelManager

12 years agoradeon/llvm: Remove AsmPrinter files
Tom Stellard [Wed, 25 Apr 2012 01:20:26 +0000 (21:20 -0400)]
radeon/llvm: Remove AsmPrinter files

12 years agoradeon/llvm: Remove IOExpansion files
Tom Stellard [Wed, 25 Apr 2012 01:15:11 +0000 (21:15 -0400)]
radeon/llvm: Remove IOExpansion files

12 years agoradeon/llvm: Remove AMDILPointerManager.cpp
Tom Stellard [Tue, 24 Apr 2012 23:54:22 +0000 (19:54 -0400)]
radeon/llvm: Remove AMDILPointerManager.cpp

12 years agoradeonsi/llvm: Fix initialization of SIMachineFunctionInfo
Tom Stellard [Wed, 25 Apr 2012 13:03:21 +0000 (09:03 -0400)]
radeonsi/llvm: Fix initialization of SIMachineFunctionInfo

SIMachineFunctionInfo needs to be initialized before any of the
AMDIL passes.

12 years agomesa/st: Fix derreference after free.
José Fonseca [Wed, 25 Apr 2012 10:41:13 +0000 (11:41 +0100)]
mesa/st: Fix derreference after free.

12 years agogallium/docs: document the new vertex fetch CAPs
Marek Olšák [Tue, 24 Apr 2012 21:10:46 +0000 (23:10 +0200)]
gallium/docs: document the new vertex fetch CAPs

12 years agonv50: fix typo in nv50_fragprog_assign_slots
Christoph Bumiller [Tue, 24 Apr 2012 18:04:48 +0000 (20:04 +0200)]
nv50: fix typo in nv50_fragprog_assign_slots

12 years agoglsl: Add implementation of inverse() for mat2/3/4.
Eric Anholt [Wed, 18 Apr 2012 18:00:44 +0000 (11:00 -0700)]
glsl: Add implementation of inverse() for mat2/3/4.

This is taken from the ogl-math project, with Inverse renamed to adj
(since it's not actually the inverse), transposed, and our types
plugged in.  There are potential CSE opportunities in this code
(particularly for hardware with RCP but not DIV), but we should be
doing CSE anyway, so don't hand-optimize.

Fixes piglit inverse tests.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Add support for generating builtin code from GLSL instead of IR.
Eric Anholt [Wed, 18 Apr 2012 17:51:23 +0000 (10:51 -0700)]
glsl: Add support for generating builtin code from GLSL instead of IR.

This takes advantage of the builtin compiler to generate IR into a
string, the same way we read GLSL for function prototypes for our
profiles.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Make ir_reader parse the "temporary" variable qualifier.
Eric Anholt [Wed, 18 Apr 2012 21:43:12 +0000 (14:43 -0700)]
glsl: Make ir_reader parse the "temporary" variable qualifier.

This lets ir_reader eat the output of builtin_compiler on actual
function definitions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Add doxygen explaining what main.cpp is for.
Eric Anholt [Wed, 18 Apr 2012 21:40:10 +0000 (14:40 -0700)]
glsl: Add doxygen explaining what main.cpp is for.

I keep getting lost in the Makefile trying to figure out what to edit
to work on builtin_compiler or glsl_compiler.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/vs: Fix texelFetchOffset()
Eric Anholt [Tue, 17 Apr 2012 18:56:26 +0000 (11:56 -0700)]
i965/vs: Fix texelFetchOffset()

It appears that when using 'ld' with the offset bits, address bounds
checking happens before the offset is applied, so parts of the drawing
in piglit texelFetchOffset() with a negative texcoord go black.

12 years agoi965/fs: Fix texelFetchOffset()
Eric Anholt [Tue, 17 Apr 2012 01:43:48 +0000 (18:43 -0700)]
i965/fs: Fix texelFetchOffset()

It appears that when using 'ld' with the offset bits, address bounds
checking happens before the offset is applied, so parts of the drawing
in piglit texelFetchOffset() with a negative texcoord go black.

12 years agonv50,nvc0: handle new vertex fetch caps
Christoph Bumiller [Tue, 24 Apr 2012 11:34:36 +0000 (13:34 +0200)]
nv50,nvc0: handle new vertex fetch caps

12 years agonv50,nvc0: don't initialize the draw module, we don't use it
Christoph Bumiller [Tue, 24 Apr 2012 11:35:44 +0000 (13:35 +0200)]
nv50,nvc0: don't initialize the draw module, we don't use it

But some day we might (e.g. for blending 16 bpp formats on nv50).

12 years agonv50: enable shader watchdog timer
Christoph Bumiller [Mon, 23 Apr 2012 18:08:54 +0000 (20:08 +0200)]
nv50: enable shader watchdog timer

12 years agodarwin: Eliminate a pthread mutex leak
Jeremy Huddleston [Mon, 23 Apr 2012 23:43:22 +0000 (16:43 -0700)]
darwin: Eliminate a pthread mutex leak

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Charles Davis <cdavis@mines.edu>
12 years agoradeonsi: stop using u_vbuf and adapt to gallium interface changes
Marek Olšák [Mon, 23 Apr 2012 23:23:33 +0000 (01:23 +0200)]
radeonsi: stop using u_vbuf and adapt to gallium interface changes

12 years agou_vbuf: don't call u_vbuf_upload_buffers if there's nothing to upload
Marek Olšák [Thu, 19 Apr 2012 17:54:23 +0000 (19:54 +0200)]
u_vbuf: don't call u_vbuf_upload_buffers if there's nothing to upload

12 years agou_vbuf: don't upload user buffers if the driver supports them
Marek Olšák [Thu, 19 Apr 2012 03:28:27 +0000 (05:28 +0200)]
u_vbuf: don't upload user buffers if the driver supports them

12 years agou_vbuf: optimize u_vbuf_translate_find_free_vb_slots
Marek Olšák [Thu, 19 Apr 2012 01:47:03 +0000 (03:47 +0200)]
u_vbuf: optimize u_vbuf_translate_find_free_vb_slots

12 years agou_vbuf: turn bool arrays into bitmasks and loops into bitwise operations
Marek Olšák [Wed, 18 Apr 2012 22:56:44 +0000 (00:56 +0200)]
u_vbuf: turn bool arrays into bitmasks and loops into bitwise operations

Optimized functions:
- u_vbuf_need_minmax_index
- u_vbuf_mapping_vertex_buffer_blocks

12 years agou_vbuf: take advantage of all new vertex fetch caps
Marek Olšák [Wed, 18 Apr 2012 23:41:46 +0000 (01:41 +0200)]
u_vbuf: take advantage of all new vertex fetch caps

12 years agou_vbuf: simplify u_vbuf_set_vertex_buffers
Marek Olšák [Wed, 18 Apr 2012 23:24:32 +0000 (01:24 +0200)]
u_vbuf: simplify u_vbuf_set_vertex_buffers

12 years agou_vbuf: rename native_attribs -> driver_attribs
Marek Olšák [Wed, 18 Apr 2012 23:12:55 +0000 (01:12 +0200)]
u_vbuf: rename native_attribs -> driver_attribs

12 years agor600g: move updating vertex buffer state into set_vertex_buffers
Marek Olšák [Sun, 1 Apr 2012 21:54:44 +0000 (23:54 +0200)]
r600g: move updating vertex buffer state into set_vertex_buffers

12 years agost/mesa: always expose ARB_ES2_compatibility
Marek Olšák [Wed, 11 Apr 2012 10:55:23 +0000 (12:55 +0200)]
st/mesa: always expose ARB_ES2_compatibility

u_vbuf translates GL_FIXED too if needed.

12 years agost/mesa: always expose ARB_half_float_vertex
Marek Olšák [Wed, 11 Apr 2012 10:54:10 +0000 (12:54 +0200)]
st/mesa: always expose ARB_half_float_vertex

u_vbuf kicks in and translates it to float if it's unsupported.

12 years agogallium: make user vertex buffers optional
Marek Olšák [Tue, 10 Apr 2012 04:00:17 +0000 (06:00 +0200)]
gallium: make user vertex buffers optional

This couldn't be split because it would break bisecting.

Summary:
* r300g,r600g: stop using u_vbuf
* r300g,r600g: also report that the FIXED vertex type is unsupported
* u_vbuf: refactor for use in the state tracker
* cso: wire up u_vbuf with cso_context
* st/mesa: conditionally install u_vbuf

12 years agoi915g: report that all vertex formats are supported
Marek Olšák [Wed, 11 Apr 2012 13:16:09 +0000 (15:16 +0200)]
i915g: report that all vertex formats are supported

So that u_vbuf isn't enabled.

12 years agor600g: don't share u_upload_mgr with u_vbuf, create its own
Marek Olšák [Wed, 11 Apr 2012 14:00:09 +0000 (16:00 +0200)]
r600g: don't share u_upload_mgr with u_vbuf, create its own

12 years agor300g: don't share u_upload_mgr with u_vbuf, create its own
Marek Olšák [Wed, 11 Apr 2012 14:00:09 +0000 (16:00 +0200)]
r300g: don't share u_upload_mgr with u_vbuf, create its own

12 years agou_vbuf: pull u_vbuf_draw_max_vertex_count into r300g
Marek Olšák [Wed, 11 Apr 2012 13:56:59 +0000 (15:56 +0200)]
u_vbuf: pull u_vbuf_draw_max_vertex_count into r300g

12 years agou_vbuf: make use of the new CAPs to determine what to do
Marek Olšák [Tue, 10 Apr 2012 03:14:26 +0000 (05:14 +0200)]
u_vbuf: make use of the new CAPs to determine what to do

This adds the ability to initialize u_vbuf_caps before creating u_vbuf itself.
It will be useful for determining if u_vbuf should be used or not.

Also adapt r300g and r600g.

12 years agogallium drivers: report that user vertex buffers are supported
Marek Olšák [Wed, 11 Apr 2012 13:40:00 +0000 (15:40 +0200)]
gallium drivers: report that user vertex buffers are supported

12 years agogallium: add CAPs for vertex fetcher
Marek Olšák [Tue, 10 Apr 2012 03:12:22 +0000 (05:12 +0200)]
gallium: add CAPs for vertex fetcher

Supported vertex formats will be queried using
is_format_supported(.., PIPE_BIND_VERTEX_BUFFER, ..).

12 years agou_vbuf: remove u_vbuf_resource
Marek Olšák [Tue, 10 Apr 2012 19:29:06 +0000 (21:29 +0200)]
u_vbuf: remove u_vbuf_resource

12 years agou_vbuf: use user_ptr from pipe_resource
Marek Olšák [Tue, 10 Apr 2012 02:37:52 +0000 (04:37 +0200)]
u_vbuf: use user_ptr from pipe_resource

12 years agogallium: add user_ptr in pipe_resource
Marek Olšák [Tue, 10 Apr 2012 02:33:23 +0000 (04:33 +0200)]
gallium: add user_ptr in pipe_resource

I need to access the pointer in st/mesa when I only have pipe_resource.

12 years agou_vbuf: override draw_vbo
Marek Olšák [Sat, 31 Mar 2012 12:52:35 +0000 (14:52 +0200)]
u_vbuf: override draw_vbo

12 years agou_vbuf: override create/bind/destroy_vertex_elements_state
Marek Olšák [Sat, 31 Mar 2012 04:01:39 +0000 (06:01 +0200)]
u_vbuf: override create/bind/destroy_vertex_elements_state

12 years agou_vbuf: override set_vertex_buffers
Marek Olšák [Sat, 31 Mar 2012 03:32:25 +0000 (05:32 +0200)]
u_vbuf: override set_vertex_buffers

12 years agou_vbuf: override set_index_buffer
Marek Olšák [Sat, 31 Mar 2012 02:56:48 +0000 (04:56 +0200)]
u_vbuf: override set_index_buffer

This makes u_vbuf_mgr call the driver instead of the other way around.

12 years agost/mesa: use cso_set_index_buffer and cso_draw_vbo
Marek Olšák [Wed, 11 Apr 2012 14:08:22 +0000 (16:08 +0200)]
st/mesa: use cso_set_index_buffer and cso_draw_vbo

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agogallium/util: use cso_draw_arrays in util_draw_vertex_buffer
Marek Olšák [Wed, 11 Apr 2012 13:51:52 +0000 (15:51 +0200)]
gallium/util: use cso_draw_arrays in util_draw_vertex_buffer

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agocso: add set_index_buffer and draw_vbo passthrough functions
Marek Olšák [Wed, 11 Apr 2012 13:51:13 +0000 (15:51 +0200)]
cso: add set_index_buffer and draw_vbo passthrough functions

v2: use util_draw_init_info

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodarwin: Don't build gallium
Jeremy Huddleston [Mon, 23 Apr 2012 23:13:51 +0000 (16:13 -0700)]
darwin: Don't build gallium

fe3f98ed70be01a49dd2e93870907d092fe4a283 intentionally broke it, so
don't build it.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoapple: Fix a use after free
Jonas Maebe [Mon, 23 Apr 2012 23:02:16 +0000 (16:02 -0700)]
apple: Fix a use after free

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agovbo: call UpdateState directly when notifying a driver about _NEW_ARRAY
Marek Olšák [Sun, 22 Apr 2012 17:21:45 +0000 (19:21 +0200)]
vbo: call UpdateState directly when notifying a driver about _NEW_ARRAY

Core Mesa doesn't need to know about this.

This also removes the hack in recalculate_input_bindings.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agovbo: do FLUSH_CURRENT before validating and updating state
Marek Olšák [Sun, 22 Apr 2012 14:36:38 +0000 (16:36 +0200)]
vbo: do FLUSH_CURRENT before validating and updating state

This fixes an assertion failure since:
   commit 81afdd20f3f574ce29559d8ad77df5c77652009e
   vbo: don't check twice whether it's valid to render

FLUSH_CURRENT may set _NEW_CURRENT_ATTRIB.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agor300g/automake: add $ARCH_FLAGS and $OPT_FLAGS
Marek Olšák [Thu, 19 Apr 2012 02:33:43 +0000 (04:33 +0200)]
r300g/automake: add $ARCH_FLAGS and $OPT_FLAGS

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g/automake: add $ARCH_FLAGS and $OPT_FLAGS
Marek Olšák [Thu, 19 Apr 2012 02:33:43 +0000 (04:33 +0200)]
r600g/automake: add $ARCH_FLAGS and $OPT_FLAGS

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g: init vars to silence warnings
Brian Paul [Mon, 23 Apr 2012 19:29:06 +0000 (13:29 -0600)]
r600g: init vars to silence warnings

12 years agobin/mklib: remove '-m32' for arm linux
Han Shen(沈涵) [Mon, 23 Apr 2012 14:28:12 +0000 (08:28 -0600)]
bin/mklib: remove '-m32' for arm linux

-m32 is not a valid option for ARM.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: no-op glCopyPixels if source region is out of bounds
Brian Paul [Fri, 20 Apr 2012 22:45:12 +0000 (16:45 -0600)]
st/mesa: no-op glCopyPixels if source region is out of bounds

If the source region for a glCopyPixels is completely outside the
source buffer bounds, no-op the copy.  Fixes a failed assertion.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoradeon/llvm: Don't print an error message when there is no error
Tom Stellard [Fri, 20 Apr 2012 13:12:47 +0000 (09:12 -0400)]
radeon/llvm: Don't print an error message when there is no error

A blank line with an empty error message was being printed even when the
target lookup succeeded.

12 years agoradeon/llvm: Lower VCREATE_v4f32 for R600 and SI
Tom Stellard [Thu, 19 Apr 2012 14:14:41 +0000 (10:14 -0400)]
radeon/llvm: Lower VCREATE_v4f32 for R600 and SI

12 years agor600g/llvm: Let ISel handle lowering to {INSERT,EXTRACT}_SUBREG
Tom Stellard [Thu, 19 Apr 2012 14:09:52 +0000 (10:09 -0400)]
r600g/llvm: Let ISel handle lowering to {INSERT,EXTRACT}_SUBREG

12 years agor600g/llvm: Only emit an instruction's explicit operands
Tom Stellard [Thu, 19 Apr 2012 15:47:08 +0000 (11:47 -0400)]
r600g/llvm: Only emit an instruction's explicit operands

12 years agor600g/llvm: Handle copies between vector registers
Tom Stellard [Fri, 20 Apr 2012 13:07:37 +0000 (09:07 -0400)]
r600g/llvm: Handle copies between vector registers