Eric Anholt [Thu, 26 Apr 2012 17:16:52 +0000 (10:16 -0700)]
glsl: Don't hide the type of struct_declaration_list.
I've been trying to derive from this for UBO support, and the slightly
obfuscated types were putting me over the edge.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Tue, 3 Jul 2012 22:19:59 +0000 (15:19 -0700)]
glcpp: Add built-in #define for GL_ARB_uniform_buffer_object.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Vincent Lejeune [Sun, 25 Dec 2011 18:17:03 +0000 (19:17 +0100)]
glsl: Parser handles "#extension GL_ARB_uniform_buffer_object"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Tue, 24 Apr 2012 19:18:17 +0000 (12:18 -0700)]
glsl: Reduce a bit of extra code in the merging of layout qualifiers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Tue, 24 Apr 2012 19:14:39 +0000 (12:14 -0700)]
glsl: Take advantage of the layout qualifier flags union to clean up parsing.
The got_one variable was set iff one of the bits in flags.i was set.
v2: Fix incorrect dropping of the ARB_conservative_depth warning.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tom Stellard [Mon, 9 Jul 2012 15:42:25 +0000 (11:42 -0400)]
r600g: Don't create a texture for the memory_pool during screen init
This fixes a segfault in r600_screen_create() introduced by
eb065f5d9d1159af3a88a64a7606c9b6d67dc3
Reported by tilman on irc.
Tom Stellard [Sun, 8 Jul 2012 16:41:05 +0000 (12:41 -0400)]
radeon/llvm: Rename namespace from AMDIL to AMDGPU
Tom Stellard [Thu, 28 Jun 2012 19:55:54 +0000 (19:55 +0000)]
r600g: Update number of gprs when adding a vertex instruction
Tom Stellard [Wed, 27 Jun 2012 13:37:05 +0000 (13:37 +0000)]
r600g/compute: Use evergreen_cb() for binding RATs
Tom Stellard [Wed, 27 Jun 2012 13:27:30 +0000 (13:27 +0000)]
r600g: Add support for RATs in evergreen_cb()
Tom Stellard [Thu, 21 Jun 2012 23:32:43 +0000 (19:32 -0400)]
r600g: Use a texture as the underlying resource for compute_memory_pool
This the first step towards being able to use evergreen_cb to bind RATs.
Tom Stellard [Fri, 22 Jun 2012 17:02:33 +0000 (17:02 +0000)]
r600g: Add is_rat flag to r600_resource_texture
Tom Stellard [Tue, 26 Jun 2012 20:54:32 +0000 (20:54 +0000)]
r600g: Add r600_context_pipe_state_emit()
This function is used when dispatching compute shader in order to avoid
mixing compute and 3D registers in the context's dirty list. This
allows the compute code to resuse 3D functions like evergreen_cb, which
return a struct r600_pipe_state and still have control over when and how
the register writes are emitted.
Tom Stellard [Mon, 25 Jun 2012 21:16:11 +0000 (21:16 +0000)]
r600g: Add pkt_flag parameter to r600_context_block_emit_dirty()
This allows the shader type bit to be set in the pm4 header when
emitting registers for compute shaders.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Tom Stellard [Tue, 26 Jun 2012 14:37:27 +0000 (14:37 +0000)]
r600g/compute: Move LOOP_CONST initialization to start_compute_cs atom
Tom Stellard [Mon, 25 Jun 2012 17:56:01 +0000 (17:56 +0000)]
r600g: Add start_compute_cs atom to struct r600_context
The start_compute_cs atom initializes some config and context registers
to the values needed for running compute shaders. When a compute shader
is dispatched, this atom is emitted after the start_cs_cmd atom, which
initializes registers that are common to both 3D and compute.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Tom Stellard [Mon, 25 Jun 2012 20:00:47 +0000 (20:00 +0000)]
r600g: Add pkt_flag member to struct r600_command_buffer
Some packets require the shader type bit (bit 1) to be set when
used for compute shaders. The pkt_flag will be initialized to
RADEON_CP_PACKET3_COMPUTE_MODE for any struct r600_command_buffer used
for dispatching compute shaders and it will be or'd against the result of
the PKT3 macro when adding a new packet to a struct r600_command buffer.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Tom Stellard [Sun, 24 Jun 2012 23:24:39 +0000 (19:24 -0400)]
r600g: Only emit start_cs_cmd atom once for compute command streams
Marek Olšák [Sat, 7 Jul 2012 22:25:36 +0000 (00:25 +0200)]
r600g: fix stencil texturing with Z32_FLOAT_S8X24_UINT
Marek Olšák [Sat, 7 Jul 2012 22:23:41 +0000 (00:23 +0200)]
r600g: add assertions after translate_colorswap/colorformat/dbformat/texformat
Marek Olšák [Sat, 7 Jul 2012 17:10:00 +0000 (19:10 +0200)]
r600g: inline r600_hw_copy_region
Marek Olšák [Sat, 7 Jul 2012 07:36:35 +0000 (09:36 +0200)]
r600g: enable dual src blending on r7xx
No lockups here.
Marek Olšák [Sat, 7 Jul 2012 16:41:01 +0000 (18:41 +0200)]
r600g: use depth format from pipe_surface, not pipe_resource
Marek Olšák [Sat, 7 Jul 2012 00:30:54 +0000 (02:30 +0200)]
r600g: use u_box_origin_2d helper function
Marek Olšák [Sat, 7 Jul 2012 15:31:42 +0000 (17:31 +0200)]
gallium/u_blitter: consolidate some state changes
Marek Olšák [Fri, 6 Jul 2012 23:26:31 +0000 (01:26 +0200)]
r600g: remove stray semicolon
Marek Olšák [Sat, 7 Jul 2012 13:09:05 +0000 (15:09 +0200)]
docs: document ARB_blend_func_extended and EXT_texture_rg in relnotes-8.1
also sort the extensions
Eric Anholt [Tue, 5 Jun 2012 20:14:38 +0000 (13:14 -0700)]
i965/fs: Invalidate live intervals after copy propagation.
For copy propgation, we've dropped the use of a GRF in favor of a
(probably later) use of a different GRF. This definitely requires
invalidating intervals.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 5 Jun 2012 20:13:33 +0000 (13:13 -0700)]
i965/fs: Invalidate live intervals in passes that remove an instruction.
Since live intervals are based on ip, removing an instruction trashes
the intervals unless we were to go do some surgery. These happen to
usually remove a use of a grf, so it's time to recalculate, anyway.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
NOTE: This is a candidate for the 8.0 release branch.
Eric Anholt [Wed, 4 Jul 2012 20:31:46 +0000 (13:31 -0700)]
i965/vs: Move the other two src_reg/dst_reg constructors to brw_vec4.cpp.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 4 Jul 2012 20:25:27 +0000 (13:25 -0700)]
i965/vs: Move class functions to brw_vec4.cpp.
This has less impact than for the FS (4k savings), because it was partially
done already, but makes things more consistent.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 4 Jul 2012 20:12:50 +0000 (13:12 -0700)]
i965/fs: Move class functions from the header to .cpp files.
Cuts compile time for brw_fs.h changes from 2.7s to .7s and reduces
i965_dri.so size by 70k.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
José Fonseca [Fri, 6 Jul 2012 19:38:41 +0000 (20:38 +0100)]
galahad: Check that texture format is supported.
José Fonseca [Fri, 6 Jul 2012 09:37:52 +0000 (10:37 +0100)]
galahad: More detailed resource checks.
José Fonseca [Fri, 6 Jul 2012 19:12:56 +0000 (20:12 +0100)]
galahad: Fix zealous warnings.
José Fonseca [Fri, 6 Jul 2012 18:13:44 +0000 (19:13 +0100)]
galahad: Enumerate all methods that are missing.
José Fonseca [Fri, 6 Jul 2012 17:45:14 +0000 (18:45 +0100)]
galahad: Implement render_condition.
José Fonseca [Fri, 6 Jul 2012 09:38:28 +0000 (10:38 +0100)]
galahad: Don't implement context methods that are not implemented by the underlying pipe driver.
José Fonseca [Fri, 6 Jul 2012 09:36:55 +0000 (10:36 +0100)]
galahad: Use debug_printf.
stderr is not visible on windows.
José Fonseca [Fri, 6 Jul 2012 17:37:48 +0000 (18:37 +0100)]
galahad: Silence creation messages.
Let galahad warnings be true warnings.
José Fonseca [Fri, 6 Jul 2012 17:31:15 +0000 (18:31 +0100)]
galahad: Use reference counting when destroying the wraped objects.
As the wrapped pipe driver may hold internal references.
José Fonseca [Fri, 6 Jul 2012 17:30:25 +0000 (18:30 +0100)]
galahad: Point to the galahad objects from the galahad sampler view.
And not the wraped driver's objects.
José Fonseca [Fri, 6 Jul 2012 15:55:09 +0000 (16:55 +0100)]
galahad: Don't defer index buffer when it's NULL.
José Fonseca [Fri, 6 Jul 2012 08:50:11 +0000 (09:50 +0100)]
target-helpers: Enable debug helpers only on debug builds.
Some of these helpers use debug_get_option, which works also on releases.
Marek Olšák [Wed, 4 Jul 2012 00:35:39 +0000 (02:35 +0200)]
st/mesa: only expose ARB_shader_bit_encoding with GLSL 1.3
I don't think it's possible or even useful to use the extension with GLSL 1.2.
Reviewed-by: Brian Paul <brianp@vmware.com>
Kristian Høgsberg [Thu, 5 Jul 2012 04:39:25 +0000 (00:39 -0400)]
egl_dri2: Reorganize the EGLImage constructors to share more code
We factor out all the EGL book-keeping into dri2_create_image() and
simplify the wayland case by using dupImage.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Kristian Høgsberg [Thu, 5 Jul 2012 04:17:47 +0000 (00:17 -0400)]
intel: Share common __DRIimage allocation code
We have the same switch and allocation code in two places.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kristian Høgsberg [Thu, 5 Jul 2012 04:07:15 +0000 (00:07 -0400)]
intel: Just look up image->internal_format using _mesa_get_format_base_format
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kristian Høgsberg [Thu, 5 Jul 2012 03:34:31 +0000 (23:34 -0400)]
intel: Remove unused __DRIimage::data_type field
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Brian Paul [Mon, 2 Jul 2012 19:47:53 +0000 (13:47 -0600)]
svga: whitespace fixes
Brian Paul [Mon, 2 Jul 2012 23:23:18 +0000 (17:23 -0600)]
Revert "mesa: #define fprintf to be __mingw_fprintf() on Mingw32"
This reverts commit
cbffaf20e9e6154310ba68bb2b44adc37ba83bcd.
Use the PRIx64 macro in the fprintf() call instead, as suggested
by Dylan Noblesmith.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Mon, 2 Jul 2012 23:23:03 +0000 (17:23 -0600)]
mesa: use the PRIx64 macro for printing 64-bit hexadecimal values
We'll revert the #define fprintf __mingw_fprintf change next.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Mon, 2 Jul 2012 23:03:50 +0000 (17:03 -0600)]
svga: implement TGSI_OPCODE_ROUND
ROUND and TRUNC are implemented with one function to reduce code duplication.
Note: ROUND isn't actually used yet, but probably will be soon.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 29 Jun 2012 23:10:58 +0000 (17:10 -0600)]
svga: fix CMP translation for vertex shaders
Converting CMP to SLT+LRP didn't work when src2 or src3 was Inf/NaN.
That's the case for GLSL sqrt(0). sqrt(0) actually happens in many
piglit auto-generated tests that use the distance() function.
v2: remove debug/devel code, per Jose
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 29 Jun 2012 22:59:46 +0000 (16:59 -0600)]
svga: properly implement TRUNC instruction
Was previously implemented with FLOOR.
Fixes quite a few piglit tests of float->int conversion, integer
division, etc.
v2: clean up left over debug/devel code, per Jose
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Tue, 3 Jul 2012 21:51:22 +0000 (15:51 -0600)]
svga: fix register collision issue in emit_conditional()
If the 'dst' register is the same as the 'pass' register we'll generate
invalid code. Use a temporary register in that case.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Fri, 29 Jun 2012 22:53:35 +0000 (16:53 -0600)]
svga: emit some debug messages when shader compilation fails
Eric Anholt [Wed, 30 May 2012 19:18:36 +0000 (12:18 -0700)]
intel: Fix a comment typo.
Gwenole Beauchesne [Wed, 18 Apr 2012 14:38:47 +0000 (16:38 +0200)]
mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.
Kristian Høgsberg [Wed, 4 Jul 2012 00:47:04 +0000 (20:47 -0400)]
GLES2: upgrade gl2ext.h to version 18099
Redo this commit, and remove the inclusion of gl2ext.h
from src/mapi/glapi/glapi_priv.h. The include was added in
8f3be339850ead96f9c6200db4e0db1f74e39d13 to fix a missing prototype for
glDrawBuffersNV and others, but it's not possible to include both
glext.h and gl2ext.h from the same file.
I don't see the missing prototype here (with or without shared glapi)
so I'm just removing the offending #include.
Also, since we're redoing this, update to the most recent gl2ext.2.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Olivier Galibert [Sun, 24 Jun 2012 09:18:18 +0000 (11:18 +0200)]
mesa/st: gl_ClipDistance must be interpolated in 3d space.
That old bug was hidden but the clipper always interpolating in 3d space
no matter what it should have been doing. Now that the interpolation
has been fixed, the bug shows up.
Fixes fdo 51364.
Signed-off-by: Olivier Galibert <galibert@pobox.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Stuart Abercrombie [Fri, 29 Jun 2012 23:31:24 +0000 (16:31 -0700)]
gallium/util: Save and restore vertex buffer state in util_gen_mipmap.
Calling glGenerateMipmap could overwrite vertex buffer state, leading
to incorrect rendering or crashes depending on the Gallium driver.
This was happening on WebGL Conformance test texture-size.
Before
784dd51198433e5c299da4a7742c68d21d68d1c1 this was covered up
by redundant vertex buffer validation.
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Marek Olšák [Tue, 3 Jul 2012 22:25:08 +0000 (00:25 +0200)]
Revert "GLES2: upgrade gl2ext.h to version 16994."
This reverts commit
8818b88748bde6de5a4a98ad237c85151b44c774.
I get a lot of errors like this one:
In file included from ../../../src/mapi/glapi/glapi_priv.h:49:0,
from glapi_dispatch.c:40:
../../../include/GLES2/gl2ext.h:1074:28: error: redefinition of typedef ‘PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC’
../../../include/GL/glext.h:10237:25: note: previous declaration of ‘PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC’ was here
This with a clean build (with git clean -fdX).
I don't get the errors on my other machine. I didn't investigate why,
a wild guess is that this depends on the version of gcc.
Marek Olšák [Tue, 3 Jul 2012 22:25:00 +0000 (00:25 +0200)]
Revert "mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x."
This reverts commit
d1665388ce53d23ee7853e5083ce6f7192061109.
Gwenole Beauchesne [Wed, 18 Apr 2012 14:38:47 +0000 (16:38 +0200)]
mesa: add GL_EXT_texture_rg extension for OpenGL ES 2.x.
Gwenole Beauchesne [Mon, 23 Apr 2012 08:55:28 +0000 (10:55 +0200)]
GLES2: upgrade gl2ext.h to version 16994.
Eric Anholt [Thu, 7 Jun 2012 15:48:50 +0000 (08:48 -0700)]
i965/fs: Allow copy propagation on uniforms.
This is a big win for savage2, hon and yofrankie. 62 new programs for
savage2/hon get 16-wide mode, along with one for humus demos and two
for tropics. Even a few shaders from tropics see reductions of 15% or
more.
total instructions in shared programs: 216536 -> 207353 (-4.24%)
instructions in affected programs: 123941 -> 114758 (-7.41%)
In benchmarking Tropics, only a .040% +/- 034% performance improvement
was observed (n=90). Rather disappointing, but I was primarily
motivated to do this patch by a regression in the number of 16-wide
shaders compiled after a GRF texturing on IVB patch I'm working on.
Hopefully this helps avoid that regression.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 6 Jun 2012 18:06:51 +0000 (11:06 -0700)]
i965/fs: Allow copy propagation with source modifiers.
This shaves a few instructions off of a ton of programs. For 12
shaders from tropics and sanctuary, it's enough reduction in register
pressure to get 16-wide mode. 7 shaders from heroes of newerth and
savage2 are hurt by about 1.1%, where copy propagation of negates ends
up preventing coalescing, but we could regain that by doing dataflow
analysis in our copy propagation.
No significant performance difference in tropics (n=11)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 6 Jun 2012 17:57:54 +0000 (10:57 -0700)]
i965/fs: Move copy propagation test out to a separate function.
It's going to get more complicated in a moment.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Mon, 4 Jun 2012 20:28:16 +0000 (13:28 -0700)]
glx/tests: Fix off-by-one error in allocating extension string buffer
NOTE: This is a candidate for the 8.0 release branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50621
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=418161
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Markus Oehme <oehme.markus@gmx.de>
Brian Paul [Mon, 2 Jul 2012 17:09:22 +0000 (11:09 -0600)]
glsl: fix unop/binop errors in comments
Paul Berry [Wed, 27 Jun 2012 23:16:26 +0000 (16:16 -0700)]
msaa: Make meta-ops save and restore state of GL_MULTISAMPLE.
The meta-ops _mesa_meta_Clear() and _mesa_meta_glsl_Clear() need to
ignore the state of GL_SAMPLE_ALPHA_TO_COVERAGE,
GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE, GL_SAMPLE_COVERAGE_VALUE,
and GL_SAMPLE_COVERAGE_INVERT when clearing multisampled buffers. The
easiest way to accomplish this is to disable GL_MULTISAMPLE during the
clear meta-ops.
Note: this patch also causes GL_MULTISAMPLE to be disabled during
_mesa_meta_GenerateMipmap() and _mesa_meta_GetTexImage() (since those
two meta-ops use MESA_META_ALL). Arguably this isn't strictly
necessary, since those meta-ops use their own non-MSAA fbo's, but it
shouldn't do any harm.
Fixes Piglit tests "EXT_framebuffer_multisample/clear {2,4}
{color,stencil}" on i965.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Paul Berry [Thu, 21 Jun 2012 18:21:22 +0000 (11:21 -0700)]
i965/msaa: Fix centroid interpolation of unlit pixels.
From the Ivy Bridge PRM, Vol 2 Part 1 p280-281 (3DSTATE_WM:
Barycentric Interpolation Mode):
"Errata: When Centroid Barycentric mode is required, HW may
produce incorrect interpolation results when a 2X2 pixels have
unlit pixels."
To work around this problem, after doing centroid interpolation, we
replace the centroid-interpolated values for unlit pixels with
non-centroid-interpolated values (which are interpolated at pixel
centers). This produces correct rendering at the expense of a slight
increase in shader execution time.
I've conditioned the workaround with a runtime flag
(brw->needs_unlit_centroid_workaround) in the hopes that we won't need
it in future chip generations.
Fixes piglit tests "EXT_framebuffer_multisample/interpolation {2,4}
{centroid-deriv,centroid-deriv-disabled}". All MSAA interpolation
tests pass now.
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Mon, 18 Jun 2012 21:50:04 +0000 (14:50 -0700)]
i965/fs: Add FS_OPCODE_MOV_DISPATCH_TO_FLAGS to fragment shader backend.
In order to compute centroid varyings correctly, the fragment shader
needs to be able to load the current pixel/sample mask into a flag
register. This patch adds an opcode to the fragment shader back-end
to do this; the opcode gets translated into the instruction
mov(1) f0<1>UW g1.14<0,1,0>UW { align1 WE_all }
Since this instruction clobbers f0, instruction scheduling has to
treat it the same as instructions that have a conditional modifier.
Reviewed-by: Eric Anholt <eric@anholt.net>
Jordan Justen [Thu, 28 Jun 2012 17:32:09 +0000 (10:32 -0700)]
i965: fix transform feedback with primitive restart
When querying GL_PRIMITIVES_GENERATED, if primitive restart
is also used, then take the software primitive restart
path so GL_PRIMITIVES_GENERATED is returned correctly.
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN is also updated
since it will also affected by the same issue.
As noted in brw_primitive_restart.c, with further work we
should be able to move this situation back to a hardware
handled path.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Sat, 9 Jun 2012 09:33:21 +0000 (02:33 -0700)]
i965: Re-enable rendering to SNORM formats.
Commit
d73f6375f50b fixed the cause of the Piglit failure with
ARB_color_buffer_float fragment clamp modes. Now that it's fixed,
there's no reason to leave snorm format rendering disabled.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Sun, 1 Jul 2012 23:21:32 +0000 (16:21 -0700)]
glsl: Remove unused ir_loop_jump::loop pointer.
Commit
0c005bd7 intended to make ir_loop_jump::mode public, but also
accidentally added a new pointer to the enclosing loop. Furthermore, it
tried to initialize the new field by adding "this->loop = loop;" to the
constructor, but since there is no loop parameter, this only initialized
the field to itself---so it will likely be a garbage pointer.
A lot of code, such as lower_jumps, allocates new loop jumps without
setting this field appropriately, so any uses would probably just crash.
Thankfully, there were none, so we can just delete the field.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51574
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Sat, 9 Jun 2012 09:33:20 +0000 (02:33 -0700)]
meta: Don't alter fragment color clamp in DrawPixels().
DrawPixels uses the MESA_META_CLAMP_FRAGMENT_COLOR flag to save/restore
the fragment color clamp mode. This is unnecessary since it never
alters it. It's also harmful: when the clamp mode is GL_FIXED_ONLY,
setting this flag causes _mesa_meta_begin to force it to GL_FALSE,
breaking clamping on SNORM formats.
DrawPixels should use the user-specified clamp mode and not change it.
Fixes Piglit's spec/ARB_color_buffer_float/GL_RGBA8_SNORM-drawpixels
test on i965/Sandybridge (with SNORM render targets re-enabled).
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Mon, 2 Jul 2012 15:10:09 +0000 (17:10 +0200)]
mesa: use FLUSH_CURRENT and not FLUSH_VERTICES in _mesa_validate_*
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL calls FLUSH_VERTICES, which
is not what we want.
This fixes a breakage in classic drivers, introduced in:
62b971673950148eb949ba23d7fdc47debea16f0
vbo: first ASSERT_OUTSIDE_BEGIN_END then FLUSH, not the other way around
It should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=51629
https://bugs.freedesktop.org/show_bug.cgi?id=51642
Reviewed-by: Brian Paul <brianp@vmware.com>
Dylan Noblesmith [Thu, 28 Jun 2012 20:29:25 +0000 (20:29 +0000)]
mesa: point to Makefile.old in the srcdir
Gets out-of-tree builds slightly closer to working.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dylan Noblesmith [Thu, 28 Jun 2012 20:28:13 +0000 (20:28 +0000)]
mesa: fix parser source gen for out-of-tree builds
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dylan Noblesmith [Thu, 28 Jun 2012 20:27:15 +0000 (20:27 +0000)]
mesa: fix api source gen for out-of-tree builds
Add $(srcdir) where needed.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Dylan Noblesmith [Thu, 28 Jun 2012 20:03:33 +0000 (20:03 +0000)]
glapi/gen: fix out of tree build
Add "-f $(srcdir)/gl_API.xml" to the arguments of all
the scripts that by default look for gl_API.xml in the
working directory when run with no arguments, and prepend
$(srcdir) to those scripts that are already using an
explicit -f argument.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
José Fonseca [Fri, 29 Jun 2012 20:18:24 +0000 (21:18 +0100)]
gallium/tgsi: Don't declare temps individually when they are all similar.
tgsi_ureg was recently enhanced to support local temporaries, and as result
temps are declared individually.
This change avoids many TEMP register declarations on common shaders.
(And fixes performance regression due to mismatches against performance
sensitive shaders.)
Reviewed-by: Brian Paul <brianp@vmware.com>
José Fonseca [Fri, 29 Jun 2012 20:31:59 +0000 (21:31 +0100)]
gallivm: Cleanup the 4 x float -> 16 ub special path in lp_build_conv.
No behaviour change intended.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
José Fonseca [Mon, 2 Jul 2012 11:08:01 +0000 (12:08 +0100)]
gallium/util: Add ULL suffix to large constants.
As suggested by Andy Furniss: it looks like some old gcc versions
require it.
Tom Stellard [Thu, 28 Jun 2012 20:05:21 +0000 (20:05 +0000)]
clover: Handle NULL devs argument in clBuildProgram
If devs is NULL, then the kernel should be compiled for all devices
associated with the program.
Francisco Jerez [Wed, 27 Jun 2012 23:16:23 +0000 (01:16 +0200)]
clover: Define non-templated copy constructor for clover::ref_ptr.
The templated copy constructor doesn't prevent the compiler from
emitting a default copy constructor, which leads to inconsistent
memory handling and was reported to cause segfaults when doing event
manipulation.
Reported-by: Tom Stellard <thomas.stellard@amd.com>
Brian Paul [Thu, 28 Jun 2012 22:26:21 +0000 (16:26 -0600)]
llvmpipe: fix comment typo
Brian Paul [Thu, 28 Jun 2012 22:07:35 +0000 (16:07 -0600)]
st/mesa: use DEBUG_INCOMPLETE_FBO debug flag
Brian Paul [Thu, 28 Jun 2012 22:07:19 +0000 (16:07 -0600)]
mesa: remove some unused gl_dlist_state fields
Tom Stellard [Thu, 21 Jun 2012 17:55:15 +0000 (13:55 -0400)]
clover: Add a function internalizer pass before LTO v2
The function internalizer pass marks non-kernel functions as internal,
which enables optimizations like function inlining and global dead-code
elimination.
v2:
- Pass vector arguments by const reference
Tom Stellard [Thu, 28 Jun 2012 20:27:55 +0000 (20:27 +0000)]
radeon/llvm: Enable vec4 loads on R600
Tom Stellard [Thu, 28 Jun 2012 20:27:32 +0000 (20:27 +0000)]
radeon/llvm: Enable floating point stores on R600
Tom Stellard [Wed, 27 Jun 2012 21:10:42 +0000 (21:10 +0000)]
radeon/llvm: Handle floating point loads on R600
Tom Stellard [Wed, 27 Jun 2012 21:09:51 +0000 (21:09 +0000)]
radeon/llvm: Expand UDIV and UREM nodes
Tom Stellard [Fri, 29 Jun 2012 16:41:32 +0000 (16:41 +0000)]
radeon/llvm: Emit raw ISA for vertex fetch instructions
José Fonseca [Fri, 29 Jun 2012 12:39:07 +0000 (13:39 +0100)]
gallium/util: Truly disable INF/NAN tests on MSVC.
Thanks to Brian for spotting this.
José Fonseca [Fri, 29 Jun 2012 12:39:07 +0000 (13:39 +0100)]
gallium/util: Disable INF/NAN tests on MSVC.
Somehow they are not recognized as constants.
José Fonseca [Wed, 20 Jun 2012 10:51:57 +0000 (11:51 +0100)]
translate: Free elt8_func/elt16_func too.
These were leaking.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>