Brian Paul [Sat, 27 Oct 2012 14:58:19 +0000 (08:58 -0600)]
mesa: silence MSVC signed/unsigned comparision warnings in hash_table.c
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Sat, 27 Oct 2012 14:58:19 +0000 (08:58 -0600)]
mesa: silence MSVC signed/unsigned comparision warnings in transformfeedback.c
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Sat, 27 Oct 2012 14:58:19 +0000 (08:58 -0600)]
mesa: silence MSVC signed/unsigned comparision warnings in accum.c
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Sat, 27 Oct 2012 14:58:19 +0000 (08:58 -0600)]
mesa: silence MSVC signed/unsigned comparison warning in texstorage.c
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Brian Paul [Sat, 27 Oct 2012 14:58:19 +0000 (08:58 -0600)]
mesa: silence MSVC double/float assignment warnings in pixel unpack code
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Vincent Lejeune [Fri, 19 Oct 2012 13:49:06 +0000 (15:49 +0200)]
r600g: tgsi-to-llvm emits right input intrinsics
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Tapani Pälli [Mon, 29 Oct 2012 18:56:28 +0000 (11:56 -0700)]
intel: support for 16 bit config with 24 depth and 8 stencil
Patch adds additional singlesample config with 565 color buffer,
24 bit depth and 8 bit stencil buffer. This makes Quadrant benchmark
work on Android. Tested with Sandybridge and Ivybridge machines.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Ian Romanick [Thu, 12 Jul 2012 21:01:23 +0000 (14:01 -0700)]
dri: Support MESA_FORMAT_SARGB8 in driCreateConfigs
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Thu, 12 Jul 2012 20:55:56 +0000 (13:55 -0700)]
intel: If the visual is sRGB, use an sRGB internal format
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Thu, 12 Jul 2012 20:52:06 +0000 (13:52 -0700)]
dri: Convert driCreateConfigs to use a gl_format enum
This is instead of the pair of GLenums for format and type that were
previously used. This is necessary for the Intel drivers to expose sRGB
framebuffer formats.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Ian Romanick [Thu, 12 Jul 2012 18:48:53 +0000 (11:48 -0700)]
dri_util: Elminiate the bytes_per_pixel table
With fewer formats to support, it's kind of useless.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Thu, 12 Jul 2012 18:42:54 +0000 (11:42 -0700)]
dri_util: Remove support for RGB332 framebuffers
None of the remaining DRI drivers in Mesa use this.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Thu, 12 Jul 2012 20:49:59 +0000 (13:49 -0700)]
swrast: Remove the 2_3_3_REV framebuffer format
There is no gl_format in Mesa that corresponds to this arrangement, so I
have a very hard time believing that this works.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Thu, 12 Jul 2012 21:07:14 +0000 (14:07 -0700)]
glx: Add the extension string for GLX_ARB_framebuffer_sRGB
From the GLX perspective, the ARB and EXT extensions are identical. Use
a single bit for both.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Maciej Wieczorek <maciej.t.wieczorek@intel.com>
Ian Romanick [Thu, 12 Jul 2012 20:56:32 +0000 (13:56 -0700)]
glx: Set sRGBCapable to a default value
Previously, if the server didn't send a GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT
tag, it would still be set to GLX_DONT_CARE (which is -1). Set it to
GL_FALSE instead.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Maciej Wieczorek <maciej.t.wieczorek@intel.com>
Bryan Cain [Tue, 23 Oct 2012 16:58:40 +0000 (11:58 -0500)]
glsl_to_tgsi: set correct register type for array and structure elements
This fixes an issue where glsl_to_tgsi_visior::get_opcode() would emit the
wrong opcode because the register type was GLSL_TYPE_ARRAY/STRUCT instead of
GLSL_TYPE_FLOAT/INT/UINT/BOOL, so the function would use the float opcodes for
operations on integer or boolean values dereferenced from an array or
structure. Assertions have been added to get_opcode() to prevent this bug
from reappearing in the future.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Marek Olšák [Fri, 12 Oct 2012 16:46:32 +0000 (18:46 +0200)]
r600g: implement texturing with 8x MSAA compressed surfaces for Evergreen
The 2x and 4x MSAA cases are completely broken. The lfdptr instruction returns
garbage there.
The 8x MSAA case is broken on Cayman, though at least the result looks somewhat
correct.
Only the 8x MSAA case works on Evergreen and is enabled.
Marek Olšák [Fri, 26 Oct 2012 15:37:07 +0000 (17:37 +0200)]
mesa: bump MAX_VARYING to 32
We're starting to get apps utilizing more than 16 varyings and
most current hardware supports 32 anyway.
Tested with r600g.
swrast, softpipe and llvmpipe still advertise 16 varyings.
This fixes a WebGL crash after launching this demo:
https://developer.mozilla.org/en-US/demos/detail/falling-cubes
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54402
NOTE: This is a candidate for the stable branches.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Andreas Boll [Mon, 29 Oct 2012 11:21:07 +0000 (12:21 +0100)]
Revert "glsl_to_tgsi: set correct register type for array and structure elements"
This reverts commit
ebd8df7a3152e34805e2863c8471ee1a2de38fe1.
accidentally pushed.
Vinson Lee [Sat, 27 Oct 2012 20:10:28 +0000 (13:10 -0700)]
scons: Add -fno-rtti to CXXFLAGS with llvm-3.2.
llvm-3.2svn r166772 no longer requires RTTI for lib/Support.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Christoph Bumiller [Thu, 25 Oct 2012 12:32:29 +0000 (14:32 +0200)]
nv50/ir: restore use of long immediate encodings
NOTE: This is a candidate for the 9.0 branch.
Christoph Bumiller [Thu, 25 Oct 2012 12:11:17 +0000 (14:11 +0200)]
nv50,nvc0: fix 2d engine stencil-only copies
Alexander V. Nikolaev [Sun, 23 Sep 2012 02:28:39 +0000 (05:28 +0300)]
gallium/gallivm: code generation options for LLVM 3.1+
LLVM 3.1+ haven't more "extern unsigned llvm::StackAlignmentOverride"
and friends for configuring code generation options, like stack
alignment.
So I restrict assiging of lvm::StackAlignmentOverride and other
variables to LLVM 3.0 only, and wrote similiar code using
TargetOptions.
This patch fix segfaulting of WINE using llvmpipe built with LLVM 3.1
Signed-off-by: Alexander V. Nikolaev <avn@daemon.hole.ru>
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Eric Anholt [Thu, 18 Oct 2012 00:48:05 +0000 (17:48 -0700)]
i965: Merge brw_prepare_query_begin() and brw_emit_query_begin().
This is a leftover from when we had to split those two functions due to
the separate BO validation step.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Thu, 18 Oct 2012 00:45:46 +0000 (17:45 -0700)]
i965: Rename misleading "active" field of brw->query.
"Active" is an already-used term for the query being between
glBeginQuery() and glEndQuery(), while this is tracking whether the
start of the packet pair for emitting state has been inserted into the
current batchbuffer.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Fri, 26 Oct 2012 16:41:49 +0000 (18:41 +0200)]
r600g: advertise 32 streamout vec4 outputs
to match the varying limit.
Brian Paul [Tue, 23 Oct 2012 22:00:20 +0000 (16:00 -0600)]
softpipe: remove extraneous whitespace
Brian Paul [Tue, 23 Oct 2012 21:54:11 +0000 (15:54 -0600)]
gallivm/llvmpipe: fix 64-bit %ll format compiler warnings for mingw32
Use the PRIx64 and PRIu64 format macros from inttypes.h. We made a
similar change in prog_print.c in
df2d81ea59993a77bd1f1ef96c5cf19ac692d5f7.
Marek Olšák [Fri, 26 Oct 2012 15:35:32 +0000 (17:35 +0200)]
r600g: advertise 32 fragment shaders inputs, not 34
José Fonseca [Fri, 26 Oct 2012 14:12:31 +0000 (15:12 +0100)]
graw/fs-test: Use user constant buffers.
Much simpler. More interesting.
José Fonseca [Fri, 26 Oct 2012 14:05:14 +0000 (15:05 +0100)]
trace: Flush before drawing.
José Fonseca [Fri, 26 Oct 2012 14:04:46 +0000 (15:04 +0100)]
graw: Ensure new members are zeroed.
Several new state members were added, and they were not being zeroed,
causing random crashes.
José Fonseca [Fri, 26 Oct 2012 13:39:46 +0000 (14:39 +0100)]
tests/graw: Update occlusion query example.
Michel Dänzer [Tue, 25 Sep 2012 10:41:31 +0000 (12:41 +0200)]
radeonsi: Handle TGSI_SEMANTIC_FACE.
Fixes two piglit tests using gl_FrontFacing.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Michel Dänzer [Thu, 6 Sep 2012 16:03:38 +0000 (18:03 +0200)]
radeonsi: Handle TGSI_SEMANTIC_BCOLOR.
Put the back face colour right after the front face colour in the LDS parameter
space.
Fixes 18 piglit tests related to two sided lighting.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Michel Dänzer [Fri, 5 Oct 2012 14:59:10 +0000 (16:59 +0200)]
radeonsi: Don't snoop context state while building shaders.
Let's use the shader key describing the state.
Ported from r600g commit
b6521801070d52bdd5908824e82c1ce2dde16e8e.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Michel Dänzer [Tue, 25 Sep 2012 10:40:49 +0000 (12:40 +0200)]
radeon/llvm: Add intrinsic for reading SI FRONT_FACE VGPR in the pixel shader.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Alex Deucher [Tue, 23 Oct 2012 16:24:45 +0000 (12:24 -0400)]
r600g: split cayman common state out into a shared function
And use it for compute. This should improve compute support
on cayman.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Alex Deucher [Tue, 23 Oct 2012 16:12:34 +0000 (12:12 -0400)]
r600g: emit some additional regs on cayman
These are common to both evergreen and cayman, but were
not emitted on cayman.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Alex Deucher [Tue, 23 Oct 2012 15:58:54 +0000 (11:58 -0400)]
r600g: there are 16 const buffer size regs for each shader stage
we were previously only setting 8 of them.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Alex Deucher [Tue, 23 Oct 2012 15:53:43 +0000 (11:53 -0400)]
r600g: rework evergreen_init_common_regs()
Move gfx specific bits out as the code is shared with
compute.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Alex Deucher [Tue, 23 Oct 2012 15:30:31 +0000 (11:30 -0400)]
r600g/compute: always CONTEXT_CONTROL packet at start of CS
It's required. The CP uses this to properly allocate new
contexts. Also do a CS partial flush since we are updating
CONFIG regs which are single state.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
José Fonseca [Fri, 26 Oct 2012 08:46:29 +0000 (09:46 +0100)]
tools/trace: More helpful message when no args are provided.
José Fonseca [Fri, 26 Oct 2012 08:45:59 +0000 (09:45 +0100)]
scons: Build xlib swrast too.
Helpful for debugging.
Christian König [Wed, 24 Oct 2012 09:18:40 +0000 (11:18 +0200)]
vl: fix the dri winsys helper screen init
Signed-off-by: Christian König <deathsimple@vodafone.de>
Vinson Lee [Thu, 25 Oct 2012 06:25:08 +0000 (23:25 -0700)]
tests: Use printf instead of debug_printf in u_format_compatible_test.
Use printf instead of debug_printf to be consistent with print
statements in rest of unit tests.
This also fixes the lack of print output with the MinGW build of
u_format_compatible_test.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Thu, 25 Oct 2012 23:03:53 +0000 (01:03 +0200)]
r300g: fix texture border color for sRGB formats
NOTE: This is a candidate for the stable branches.
Kenneth Graunke [Wed, 24 Oct 2012 20:17:24 +0000 (13:17 -0700)]
glsl: Allow ir_if in the linker's move_non_declarations function.
Global initializers using the ?: operator with at least one non-constant
operand generate ir_if statements. For example,
float foo = some_boolean ? 0.0 : 1.0;
becomes:
(declare (temporary) float conditional_tmp)
(if (var_ref some_boolean)
((assign (x) (var_ref conditional_tmp) (constant float (0.0))))
((assign (x) (var_ref conditional_tmp) (constant float (1.0)))))
This pattern is necessary because the second or third arguments could be
function calls, which create statements (not expressions).
The linker moves these global initializers into the main() function.
However, it incorrectly had an assertion that global initializer
statements were only assignments, calls, or temporary variable
declarations. As demonstrated above, they can be if statements too.
Other than the assertion, everything works fine. So remove it.
Fixes new Piglit test condition-08.vert, as well as an upcoming
game that will be released on Steam.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 25 Oct 2012 09:29:15 +0000 (02:29 -0700)]
i965/vs: Preserve the type when copy propagating into an instruction.
Consider the following code, which reinterprets a register as a
different type:
mov(8) g6<1>F g1.4<0,4,1>.xF
and(8) g5<1>.xUD g6<4,4,1>.xUD 0x7fffffffUD
Copy propagation would notice that we can replace the use of g6 with
g1.4 and eliminate the MOV. Unfortunately, it failed to preserve the UD
type, incorrectly generating:
and(8) g5<1>.xUD g6<4,4,1>.xF 0x7fffffffUD
Found while debugging Ian's uncommitted ARB_vertex_program LOG opcode
test with my new Mesa IR -> Vec4 IR translator.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Thu, 25 Oct 2012 04:16:46 +0000 (21:16 -0700)]
i965/vs: Don't lose the MRF writemask when doing compute-to-MRF.
Consider the following code sequence:
mul(8) g4<1>F g1<0,4,1>.wzwwF g3<4,4,1>.wzwwF
mov.sat(8) m1<1>.xyF g4<4,4,1>F
mul(8) g4<1>F g1<0,4,1>.xxyxF g3<4,4,1>.xxyxF
mov.sat(8) m1<1>.zwF g4<4,4,1>F
The compute-to-MRF pass will discover the first mov.sat and attempt to
replace it by rewriting earlier instructions. Everything works out,
so it replaces scan_inst's destination file, reg, and reg_offset,
resulting in:
mul(8) m1<1>F g1<0,4,1>.wzwwF g3<4,4,1>.wzwwF
mul(8) g4<1>F g1<0,4,1>.xxyxF g3<4,4,1>.xxyxF
mov.sat(8) m1<1>.zwF g4<4,4,1>F
Unfortunately, it loses the .xy writemask on the mov.sat's MRF
destination. While this doesn't pose an immediate problem, it then
proceeds to transform the second mov.sat, resulting in:
mul(8) m1<1>F g1<0,4,1>.wzwwF g3<4,4,1>.wzwwF
mul(8) m1<1>F g1<0,4,1>.xxyxF g3<4,4,1>.xxyxF
Instead of writing both halves of the vector (like the original code),
it overwrites the full vector both times, clobbering the desired .xy
values.
When encountering a MOV, the compute-to-MRF code scans for instructions
which generate channels of the MOV source. It ensures that all
necessary channels are available (possibly written by several
instructions). In this case, *more* channels are available than
necessary, so we want to take the subset that's actually used.
Taking the bitwise and of both writemasks should accomplish that.
This was discovered by analyzing an ARB_vertex_program test
(glean/vertProg1/MUL test (with swizzle and masking)) with my new
Mesa IR -> Vec4 IR translator code. However, it should be possible
with GLSL programs as well.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 22 Oct 2012 17:56:46 +0000 (10:56 -0700)]
glcpp: Don't use infinite lookhead for #define differentiation.
Previously, we used lookahead patterns to differentiate:
#define FOO(x) function macro
#define FOO (x) object macro
Unfortunately, our rule for function macros:
{HASH}define{HSPACE}+/{IDENTIFIER}"("
relies on infinite lookahead, and apparently triggers a Flex bug where
the generated code overflows a state buffer (see YY_STATE_BUF_SIZE).
There's no need to use infinite lookahead. We can simply change state,
match the identifier, and use a single character lookahead for the '('.
This apparently makes Flex not generate the giant state array, which
avoids the buffer overflow, and should be more efficient anyway.
Fixes piglit test 17000-consecutive-chars-identifier.frag.
NOTE: This is a candidate for every release branch ever.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Carl Worth <cworth@cworth.org>
Kenneth Graunke [Mon, 22 Oct 2012 03:58:18 +0000 (20:58 -0700)]
i965/vs: Fix debug dumping of VS push constants.
While copying the values into the batch space, we advance the param
pointer. The debug code then tries to iterate over all the uploaded
values, starting at param...which is now the end of the uploaded data,
rather than the start.
This patch saves a pointer to the start of push constant space before
it gets altered and switches the debug code to use that.
Tested by uncommenting the code and examining the output of
glsl-vs-clamp-1.shader_test. Previously all values appeared to be zero.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Matt Turner [Tue, 16 Oct 2012 23:20:36 +0000 (16:20 -0700)]
mesa/tests: Add ES3.0 dispatch table sanity test
Since ES3.0 is backward compatible with 2.0, we check that all the 2.0
functions and additional 3.0 functions exist.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Matt Turner [Tue, 16 Oct 2012 21:37:39 +0000 (14:37 -0700)]
Split dispatch sanity's validate_function test into two
Will be useful for the next patch, adding GLES 3 testing.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Paul Berry [Tue, 23 Oct 2012 17:59:44 +0000 (10:59 -0700)]
dispatch_sanity: print names of functions that shouldnt be in dispatch table.
Previously we just printed the dispatch table index and the user had
to convert it to a function name. That was a pain because when
FEATURE_remap_table is defined, the assignment of functions to
dispatch table entries is done at run time.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Paul Berry [Tue, 23 Oct 2012 17:49:33 +0000 (10:49 -0700)]
shared-glapi: implement _glapi_get_proc_name().
Previously this function was only implemented for non-shared-glapi
builds. Since the function is only intended for debugging purposes we
use a simple O(n) algorithm.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Thu, 25 Oct 2012 18:55:07 +0000 (11:55 -0700)]
src/glsl/tests/Makefile.am: Specify -I... in AM_CPPFLAGS
When specifying per-target CFLAGS (e.g., ralloc_test_CFLAGS) AM_CFLAGS
are not used. AM_CPPFLAGS should be used for includes anyway.
Fixes a build problem since
41b14d125:
CC ralloc_test-ralloc.o
In file included from ../../../src/glsl/ralloc.c:42:0:
../../../src/glsl/ralloc.h:57:27: fatal error: main/compiler.h: No such file or directory
Acked-by: Paul Berry <stereotype441@gmail.com>
Matt Turner [Mon, 22 Oct 2012 20:13:36 +0000 (13:13 -0700)]
egl: Import eglext.h revision 19332
The version number (14) wasn't updated.
Reviewed-by: Brian Paul <brianp@vmware.com>
Matt Turner [Tue, 23 Oct 2012 20:30:09 +0000 (13:30 -0700)]
ralloc: Annotate printf functions with PRINTFLIKE(...)
Catches problems such as (in the gles3 branch)
glcpp-parse.y: In function '_glcpp_parser_handle_version_declaration':
glcpp-parse.y:1990:39: warning: format '%lli' expects argument of type
'long long int', but argument 4 has type 'int' [-Wformat]
As a side-effect, remove ralloc.c's likely/unlikely macros and just use
the ones from main/compiler.h.
NOTE: This is a candidate for the release branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Matt Turner [Tue, 23 Oct 2012 17:57:15 +0000 (10:57 -0700)]
build: Ship install-sh in the tarball
Fixes the problem where configure from the tarball would report missing
files:
$ ./configure
configure: error: cannot find install-sh, install.sh, or shtool in bin
NOTE: This is a candidate for the 9.0 branch.
José Fonseca [Thu, 25 Oct 2012 14:47:12 +0000 (15:47 +0100)]
mesa/st: Don't use 4bits for GL_UNSIGNED_BYTE_3_3_2(_REV)
4bits and 3bits quantitization values differ significantly for
values other than 0 and 1.
Fixes piglit draw-pixels for softpipe/llvmpipe.
NOTE: Probably a candidate for stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
José Fonseca [Thu, 25 Oct 2012 14:30:19 +0000 (15:30 +0100)]
trace: Fix dumping of set_constant_buffer method.
Andreas Boll [Wed, 24 Oct 2012 21:59:44 +0000 (23:59 +0200)]
docs: add another fixed bug to mesa 8.0.5 release notes
Reported-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Andreas Boll [Wed, 24 Oct 2012 21:43:02 +0000 (23:43 +0200)]
docs: Add 8.0.5 release notes
Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com>
Bryan Cain [Tue, 23 Oct 2012 16:58:40 +0000 (11:58 -0500)]
glsl_to_tgsi: set correct register type for array and structure elements
This fixes an issue where glsl_to_tgsi_visior::get_opcode() would emit the
wrong opcode because the register type was GLSL_TYPE_ARRAY/STRUCT instead of
GLSL_TYPE_FLOAT/INT/UINT/BOOL, so the function would use the float opcodes for
operations on integer or boolean values dereferenced from an array or
structure. Assertions have been added to get_opcode() to prevent this bug
from reappearing in the future.
Vincent Lejeune [Fri, 19 Oct 2012 13:40:38 +0000 (15:40 +0200)]
r600g: force bank_swizzle if already set
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Vincent Lejeune [Thu, 18 Oct 2012 20:38:16 +0000 (22:38 +0200)]
r600g: rewrite tgsi-to-llvm load-input to handle fragcoord
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Christoph Bumiller [Wed, 24 Oct 2012 18:33:02 +0000 (20:33 +0200)]
nv50/ir/tgsi: fix srcMask for TXP with SHADOW1D
Ian Romanick [Mon, 22 Oct 2012 21:08:31 +0000 (14:08 -0700)]
mesa: Use MIN instead of CLAMP for unsigned source data
This silences a zillion GCC warnings like:
../../../src/mesa/main/pack.c: In function '_mesa_pack_rgba_span_from_uints':
../../../src/mesa/main/pack.c:560:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Michel Dänzer [Mon, 22 Oct 2012 17:20:56 +0000 (19:20 +0200)]
st/mesa: Fix assertions for copying texture image to finalized miptree.
The layer dimension of array textures is not subject to mipmap minification.
OTOH we were missing an assertion for the depth dimension.
Fixes assertion failures with piglit {f,v}s-textureSize-sampler1DArrayShadow.
For some reason, they only resulted in piglit 'warn' results for me, not
failures.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56211
NOTE: This is a candidate for the stable branches.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Andreas Boll [Tue, 23 Oct 2012 16:29:41 +0000 (18:29 +0200)]
gallium/docs: fix sphinx warning
src/gallium/docs/source/context.rst:495: WARNING:
malformed hyperlink target.
Reviewed-by: Brian Paul <brianp@vmware.com>
Vinson Lee [Sat, 20 Oct 2012 02:33:11 +0000 (19:33 -0700)]
scons: Do not use -fvisibilty=hidden on Cygwin.
This is a follow-up to commit
db78643182dc39ed592dd8c2e5fc7c8eeb7316a1.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Andreas Boll [Sat, 20 Oct 2012 19:50:30 +0000 (21:50 +0200)]
mesa: fix indentation in get-pick-list.sh script
NOTE: This is a candidate for the stable branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Andreas Boll [Fri, 19 Oct 2012 21:13:12 +0000 (23:13 +0200)]
mesa: grep for commits with cherry picked in commit message only once
and save them temporary in already_picked
NOTE: This is a candidate for the stable branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Andreas Boll [Fri, 19 Oct 2012 21:00:17 +0000 (23:00 +0200)]
mesa: optimize get-pick-list.sh script
cuts down the while loop iterations from 4600 to 380 commits at the
moment
NOTE: This is a candidate for the stable branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Andreas Boll [Fri, 19 Oct 2012 20:54:56 +0000 (22:54 +0200)]
mesa: simplify get-pick-list.sh script
and add a description for the script
NOTE: This is a candidate for the stable branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Fri, 19 Oct 2012 20:30:53 +0000 (22:30 +0200)]
mesa: add get-pick-list.sh script into bin/
NOTE: This is a candidate for the stable branches.
Paul Berry [Fri, 19 Oct 2012 13:37:09 +0000 (06:37 -0700)]
_mesa_create_exec_table: GLES3 fixes.
This patch sets up the dispatch table for the following GLES3
functions when a GLES3 context is in use:
- BeginQuery
- BeginTransformFeedback
- BindSampler
- BindTransformFeedback
- BlitFramebuffer
- ClearBufferfi
- ClearBufferfv
- ClearBufferiv
- ClearBufferuiv
- ClientWaitSync
- CopyBufferSubData
- DeleteQueries
- DeleteSamplers
- DeleteSync
- DeleteTransformFeedbacks
- EndQuery
- EndTransformFeedback
- FenceSync
- FramebufferTextureLayer
- GenQueries
- GenSamplers
- GenTransformFeedbacks
- GetInteger64v
- GetQueryObjectuiv
- GetQueryiv
- GetSamplerParameterfv
- GetSamplerParameteriv
- GetStringi
- GetSynciv
- GetTransformFeedbackVarying
- GetVertexAttribIiv
- GetVertexAttribIuiv
- IsQuery
- IsSampler
- IsSync
- IsTransformFeedback
- PauseTransformFeedback
- RenderbufferStorageMultisample
- ResumeTransformFeedback
- SamplerParameterf
- SamplerParameterfv
- SamplerParameteri
- SamplerParameteriv
- TransformFeedbackVaryings
- VertexAttribDivisor
- VertexAttribIPointer
- WaitSync
And it avoids setting up the dispatch table for these non-GLES3
functions:
- ColorMaski
- GetBooleani_v
- Enablei
- Disablei
- IsEnabledi
- ClearColorIiEXT
- ClearColorIuiEXT
- TextureStorage2DEXT
- TextureStorage3DEXT
- GetActiveUniformName
- GetnUniformdv
- GetnUniformfv
- GetnUniformiv
- GetnUniformuiv
Reviewed-by: Brian Paul <brianp@vmware.com>
v2: Make the ctx argument to _mesa_init_transform_feedback_dispatch()
a const pointer. Add a comment to remind us to add
GetBufferParameteri64v once tests exist for it. Also add
VertexAttribDivisor for GLES3, and remove GetActiveUniformName and
GetnUniform{dv,fv,iv,uiv} for GLES3.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Fri, 19 Oct 2012 13:09:04 +0000 (06:09 -0700)]
_mesa_create_exec_table(): deprecate ProgramStringARB.
This function is only useful for the ARB_{vertex,fragment}_program
extensions, which we don't expose in core contexts.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Fri, 19 Oct 2012 13:01:42 +0000 (06:01 -0700)]
_mesa_create_exec_table: de-deprecate GetPointerv.
glGetPointerv was de-deprecated in GL 4.3, because GL 4.3 adds
functionality from KHR_debug and ARB_debug_output, which require
glGetPointerv.
This patch modifies _mesa_create_exec_table() to populate
glGetPointerv in the dispatch table for core contexts.
Technically this is not in compliance with the spec--what we really
ought to do for core contexts is expose glGetPointerv only when a GL
4.3 context is in use or one of the two extensions is present.
However, it seems silly to go to that extra work, since the only
client-visible effect would be for glGetPointerv to raise an
INVALID_OPERATION error instead of an INVALID_ENUM error. Besides,
the other functions set up by _mesa_create_exec_table() only depend on
the API in use, not on the GL version or extensions supported.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Mon, 22 Oct 2012 22:02:50 +0000 (15:02 -0700)]
glapi: Alias VertexAttribDivisor and VertexAttribDivisorARB.
There's no reason to have separate slots in the dispatch table for
these two functions, since they are synonymous.
Note: previous to this patch, we never populated the dispatch table
slot for VertexAttribDivisor, which was ok, since it is not required
until 3.3. After this patch, both functions will be usable provided
that the ARB_instanced_arrays extension is present.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Fri, 19 Oct 2012 05:13:02 +0000 (22:13 -0700)]
glapi: Alias ClampColor and ClampColorARB.
There's no reason to have separate slots in the dispatch table for
these two functions, since they are synonymous.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Paul Berry [Sun, 21 Oct 2012 18:16:07 +0000 (11:16 -0700)]
main: Fix warning ('struct gl_context' declared inside parameter list).
This eliminates a warning in GCC 4.7.1.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 17 Oct 2012 00:36:42 +0000 (17:36 -0700)]
mesa: Return 0 for GL_CURRENT_QUERY with a mismatched query target.
With the previous two commits, this fixes piglit
GL_ARB_occlusion_query2/api.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 17 Oct 2012 00:26:05 +0000 (17:26 -0700)]
mesa: Refuse to EndQuery with a mismatched query target.
v2: Add a comment about what we're checking for.
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 17 Oct 2012 00:21:39 +0000 (17:21 -0700)]
mesa: Throw an error for a new query on an already-active query target.
There's a similar test below, but it's not the same: that one checks whether
this query object is already active (potentially on another target).
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 17 Oct 2012 20:07:33 +0000 (13:07 -0700)]
i965: Actually add support for GL_ANY_SAMPLES_PASSED from GL_ARB_oq2.
v2: Fix mangled sentence in the comment, and make the loop exit early.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
Brian Paul [Fri, 19 Oct 2012 21:34:55 +0000 (15:34 -0600)]
st/mesa: free TGSI tokens with ureg_free_tokens()
since they're allocated by ureg_get_tokens().
NOTE: This is a candidate for the 8.0 and 9.0 branches.
Brian Paul [Fri, 19 Oct 2012 20:51:20 +0000 (14:51 -0600)]
st/mesa: replace REALLOC() with realloc()
We should use the later since we're freeing the memory with free(),
not the gallium FREE() macro.
This fixes a mismatch when using the gallium debug memory functions.
NOTE: This is a candidate for the 9.0 branch.
Brian Paul [Fri, 19 Oct 2012 20:49:39 +0000 (14:49 -0600)]
docs: GL_ARB_texture_storage is supported for all gallium drivers
Matt Turner [Thu, 11 Oct 2012 17:57:26 +0000 (10:57 -0700)]
Re-add HAVE_PTHREADS preprocessor macro
Broken in commit
814345f54b.
NOTE: This is a candidate for the 9.0 branch.
Kristian Høgsberg [Sun, 21 Oct 2012 17:00:28 +0000 (13:00 -0400)]
gbm: Use the kms dumb ioctls for cursor instead of libkms
We need to create bos suitable for cursor usage that we can map and
write data into. The kms dumb ioctls is all we need for this, so drop
the dependency on libkms.
Tom Stellard [Wed, 17 Oct 2012 19:21:48 +0000 (19:21 +0000)]
r600g: Remove special handling of PRED_SET* insructions for LLVM 3.2
The 3.2 version of the backend now sets all the correct fields for
PRED_SET* instructions.
Tom Stellard [Wed, 17 Oct 2012 19:16:00 +0000 (19:16 +0000)]
radeon/llvm: Sort tgsi opcode action initialization
This was done in order to identify and remove duplicate entries.
Tom Stellard [Wed, 17 Oct 2012 20:19:11 +0000 (20:19 +0000)]
radeon/llvm: Fix lowering TGSI_OPCODE_SSG
Eric Anholt [Tue, 16 Oct 2012 18:27:27 +0000 (11:27 -0700)]
i965: Stop flushing the batch on timestamp queries, too.
Given the usecase we have of trying to measure timestamps across individual
draw calls, flushing will totally mess up what people are trying to measure.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Tue, 16 Oct 2012 18:13:49 +0000 (11:13 -0700)]
i965: Don't flush the batch immediately on EndQuery.
The theory I had when I wrote the code was that you wanted to minimize latency
on your queries because the app was going to ask soon. Only, it turns out
that everybody batches up their queries and asks for the results later (often
after the next SwapBuffers!), so this was a pessimization.
Until now, I had no workload where it mattered enough to benchmark. Recently
I started playing some Minecraft, which uses tons of queries to decide whether
to render chunks of the terrain. For that app, avoiding the flush in the
query-generation loop improves performance 22.7% +/- 4.7% (n=3) on an apitrace
capture of it (confirmed in game by watching the fps meter found by pressing
F3, 15/16 -> 20/21 fps).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 19 Oct 2012 18:21:18 +0000 (11:21 -0700)]
i965/fs: Fix typo in refactor of brw_fs_reg_allocate.cpp.
I'm amazed that my usual warnings check didn't catch this, and that this
passed piglit.
Tapani Pälli [Fri, 19 Oct 2012 06:45:20 +0000 (09:45 +0300)]
i965/vs: include format argument in debug printf
otherwise some compilers will throw error
"error: format not a string literal and no format arguments"
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Michel Dänzer [Fri, 19 Oct 2012 09:59:35 +0000 (11:59 +0200)]
st/mesa: Fix source miptree level for copying data to finalized miptree.
Fixes WebGL texture mips conformance test, no piglit regressions.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44912
NOTE: This is a candidate for the stable branches.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>