Commit Graph

48947 Commits

Author SHA1 Message Date
Brian Paul
edca96547a swrast: convert blit_linear() to Map/UnmapRenderbuffer()
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-09 08:11:33 -07:00
Brian Paul
7274538da7 mesa: add _mesa_unpack_ubyte_rgba_row() function
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-09 08:11:33 -07:00
Brian Paul
301fba5445 mesa: rename _mesa_unpack_int_rgba_row() to _mesa_unpack_uint_rgba_row()
Since it returns uint values, not int.

Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-09 08:11:33 -07:00
Christian König
8c2bfa34a0 vl: replace decode_buffers with auxiliary data field
Based on patches from Maarten Lankhorst <m.b.lankhorst@gmail.com>

Signed-off-by: Christian König <deathsimple@vodafone.de>
Acked-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
2012-01-09 12:21:22 +01:00
Kenneth Graunke
37240d2132 i965: Actually enable SIMD16 dispatch on Ivybridge.
Commit acf82657f4 supposedly enabled
SIMD16 dispatch, but neglected to set the "16 Pixel Dispatch Enable"
bit, so nothing actually got enabled.

Furthermore, it neglected to set up the Dispatch GRF Start Register for
kernel 2, which is the SIMD16 program.

Increases performance in Nexuiz by ~15% at 800x600 (n=3).

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-08 14:38:03 -08:00
Marek Olšák
ed22f8ed2c nvfx: remove unused-but-set variables 2012-01-08 19:09:37 +01:00
Kenneth Graunke
a56a732c69 i965: Correct _NEW_TRANSOFORM typos.
Using the proper spelling, _NEW_TRANSFORM, makes searching work better.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-07 20:01:59 -08:00
Kenneth Graunke
6a26005c1e i965: Correct misspellings of "invariant".
$ dict invarient
No definitions found for "invarient", perhaps you mean:
gcide:  Invariant
wn:  invariant

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-07 20:01:59 -08:00
Bryan Cain
73b26e4d12 glsl_to_tgsi: emit IABS for absolute value of integers 2012-01-07 16:20:28 -06:00
Brian Paul
56b57aa360 mesa: rework ctx->Driver.CopyTexSubImage() parameters
Replace target, level parameters with gl_texture_image.
Add gl_renderbuffer parameter to indicate source buffer for the copy.

This removes some redundant code in the drivers to find the source
renderbuffer and the destination texture image (which we already had
in _mesa_CopyTexSubImage).

Signed-off-by: Brian Paul <brianp@vmware.com>
2012-01-07 15:04:23 -07:00
Bryan Cain
4c0f1fb5ec gallium: add an IABS opcode to TGSI
This is a necessary operation that is missing from TGSI.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-01-07 15:37:32 -06:00
Brian Paul
291e374ea5 mesa: remove unused _mesa_unpack_uint_rgba_row() prototype 2012-01-07 14:34:44 -07:00
Bryan Cain
673535f607 glsl_to_tgsi: fix emission of boolean constants
We use 0xffffffff for true, but visit(ir_constant *) was emitting 1.
2012-01-07 15:33:36 -06:00
Bryan Cain
c4529d10be glsl_to_tgsi: remove bad assertion 2012-01-07 15:33:36 -06:00
Brian Paul
282292f24c swrast: fix Z testing of points/lines for 16-bit depth buffers
We were comparing 32-bit Z buffer values against 16-bit fragment values.
Need to do scaling like for the 24-bit case.

Triangle Z testing was OK since it didn't hit this code path.
2012-01-07 14:16:27 -07:00
Brian Paul
8dffb6bdab swrast: s/GLbitfield/GLbitfield64/ for sw_span::arrayAttribs
This is a bitfield of FRAG_BIT_x values so it should be 64-bits now.
2012-01-07 14:16:27 -07:00
Brian Paul
7d960a352f swrast: s/GLint/GLuint/ to silence MSVC signed/unsigned comparison warning 2012-01-07 14:16:27 -07:00
Brian Paul
5fc6db6708 meta: add some 'f' suffixes to silence MSVC warnings 2012-01-07 14:16:27 -07:00
Brian Paul
6bf7d40214 mesa: add some 'f' suffixes to silence MSVC warnings 2012-01-07 14:16:27 -07:00
Brian Paul
70754dd1fb util: silence some MSVC type conversion warnings 2012-01-07 14:16:27 -07:00
Brian Paul
f0f623a907 draw: replace assert(0) with debug_warn_once()
If the assertion was hit, it probably meant that we were unable to allocate
or map a vertex buffer.  Instead of dying in a debug build, issue a warning
and continue.
2012-01-07 14:16:27 -07:00
Brian Paul
94bf2d48e1 util: add debug_warn_once() macro
Emits a warning message, but only once to avoid tons of repeated warnings.
2012-01-07 14:16:27 -07:00
Brian Paul
994c33db87 draw: whitespace fixes, etc. 2012-01-07 14:16:27 -07:00
Brian Paul
488dd2c191 gallium: make vbuf_render::set_primitive() return void
All the implementations of this function always return TRUE.
2012-01-07 14:16:27 -07:00
Brian Paul
59d2c4f8e5 svga: fix assorted whitespace issues, add copyright comment 2012-01-07 14:16:27 -07:00
Brian Paul
78028dc2bd svga: add switch cases for PIPE_SHADER_CAP_OUTPUT_READ
Silences unhandled switch case warning.
Return 0 since we don't want to read from output regs.
2012-01-07 14:16:27 -07:00
Brian Paul
4c502e05e8 mesa: add/update comments in _mesa_copy_buffer_subdata() 2012-01-07 14:16:27 -07:00
Marek Olšák
2bdf93449a u_vbuf: don't unroll indices if mapping vertex buffers blocks 2012-01-07 20:48:28 +01:00
Dave Airlie
784026139c draw: fix missing include for u_format.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-07 08:57:12 +00:00
Dave Airlie
a103c61d27 st/mesa: add support for clip vertex.
We need to pass the pre-projection matrix clip planes into the driver,
instead of the post for the case we have a vertex shader that writes clip
vertex.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-07 08:36:25 +00:00
Dave Airlie
9cea86f501 gallium: add new semantic for clip vertex.
This is to match the gl_ClipVertex output from GLSL 1.20.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-07 08:36:24 +00:00
Dave Airlie
17707d89f4 draw: don't translate non-floats to float.
translate signed/unsigned integers to coresponding uint/sint r32g32b32a32 types.

This fixes a bunch of piglit tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-07 08:31:43 +00:00
Dave Airlie
e1ff84371c st/mesa: fix default interpolation for colors.
Brian mentioned that mesa-demos/reflect was broken on softpipe,
by my previous commit. The problem was were blindly translating none
to perspective, when color/pntc at least need it linear.

this is the final version that fixes the reflect regression.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-07 08:30:23 +00:00
Kenneth Graunke
be21ded2ae glsl/builtins: Add missing mix(genType, genType, bvec) built-ins.
The IR for mix(float, float, bool) was missing a write mask, causing the
IR reader to die horribly.  Furthermore, I neglected to add any of the
new prototypes to the 1.30 profiles.

Fixes oglconform's glsl-bif-com advanced.mix test cases.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44477
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-06 18:18:15 -08:00
Kenneth Graunke
7ccf04ebcf i965/vs: Fix invalid array access in copy propagation.
Accessing virtual_grf_reg_map[inst->dst.reg] is invalid if
inst->dst.file != GRF.  Since is_direct_copy already implies a GRF
destination, we can just move the check earlier.

Fixes a regression in commit 07ee9f374f.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44302
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-06 18:17:46 -08:00
Kenneth Graunke
de88e00c94 configure.ac: Remove unused GLUT substitutions.
GLUT was removed from the main tree a while ago; nothing uses these
substitutions.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-01-06 18:16:10 -08:00
Ian Romanick
1f125374e7 glsl: Don't mark assignment temporaries as read-only
The various l-value errors this was designed to catch are now caught
by other means.  Marking the temporaries as read-only now just
prevents sensible error messages from being generated.  It's

0:0(0): error: function parameter 'out p' references the read-only variable '_post_incdec_tmp'

versus

0:13(5): error: function parameter 'out p' references a post-decrement operation

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-01-06 14:32:50 -08:00
Ian Romanick
208b5b113f glsl: Emit extra errors for l-value violations in 'out' or 'inout' parameters
Somethings, like pre-increment operations, were not previously caught.
After the 8.0 release, this code needs some major refactoring and
clean-up.  It's a mess. :(

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42755
2012-01-06 14:32:50 -08:00
Ian Romanick
e9015e99d0 glsl: Emit errors for assignments to non-l-value expressions
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42755
2012-01-06 14:32:50 -08:00
Ian Romanick
fa0a9ac5cd glsl: Track descriptions of some expressions that can't be l-values
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
2012-01-06 14:32:50 -08:00
Brian Paul
c87247f6a8 mesa: remove gl_framebuffer:_DepthBuffer, _StencilBuffer fields
These were used by swrast to make a combined depth+stencil buffer look
like separate depth and stencil buffers.  But that's no longer needed
after rewriting the depth/stencil code in swrast.

Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-06 14:00:34 -07:00
Brian Paul
21b28d520f swrast: remove s_depthstencil.[ch] files
The code is no longer used.

Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-06 14:00:29 -07:00
Brian Paul
030e408181 swrast: remove calls to _swrast_update_depth/stencil_buffer()
These functions updated the gl_renderbuffer::_DepthBuffer and
_StencilBuffer fields.  But those fields are no longer used.

Reviewed-by: Eric Anholt <eric@anholt.net>
2012-01-06 14:00:19 -07:00
Eric Anholt
deb6dd6b4d i965: Turn on ARB_depth_buffer_float by default.
Everything about this that we have tests for works except for the
deprecated metaops.  The conclusion we came to on IRC sounded like we
were OK with turning it on as long as core functionality works.  The
remaining failures (copypixels, drawpixels) should just be a matter of
finishing the MapRenderbuffer for them.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-06 09:49:21 -08:00
Eric Anholt
3786a3e644 swrast: Convert the glBlitFramebuffer(GL_NEAREST) path to MapRenderbuffer().
Fixes on i965:
ARB_depth_buffer_float/fbo-depthstencil-GL_DEPTH32F_STENCIL8-blit
ARB_depth_buffer_float/fbo-stencil-GL_DEPTH32F_STENCIL8-blit

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-01-06 09:49:15 -08:00
Eric Anholt
61ea677bdd mesa: Fix packing of stencil bits to MESA_FORMAT_Z32_FLOAT_X24S8.
We were converting our ubyte stencil value to a float.  Just write it
as a uint, which overwrites the X24 part of X24S8 with 0 but shouldn't
matter.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-01-06 09:49:08 -08:00
Eric Anholt
38c6f1e6ca swrast: Fix use of uninitialized value in rbmapping changes.
I'm so surprised that gcc didn't catch this that I feel like I must be
misreading.  srcMap is what we initialize (along with dstMap) from
this map value right after this check.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-01-06 09:49:01 -08:00
Eric Anholt
fb5252a351 swrast: Use the fast copypixels code to implement fast glBlitFramebuffer().
They were meaning to do the same thing of memcpying rows, so just
write the code once.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-01-06 09:48:55 -08:00
Eric Anholt
cedbfc0050 swrast: Move the check for fast_copy_pixels() ability to caller.
I'm going to reuse this function from glBlitFramebuffer() handling,
which wants to do the same thing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-01-06 09:48:47 -08:00
Eric Anholt
60982976ee i965: Add sensible disasm for the JMPI instruction.
We care about the jump distance, not that the first src is always the
ip register.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-06 09:48:32 -08:00