summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-10-28r600g: make tgsi-to-llvm generates store.pixel* intrinsic for fsexportVincent Lejeune6-12/+130
2012-10-28Disable VMVincent Lejeune1-2/+2
2012-10-26i965: Merge brw_prepare_query_begin() and brw_emit_query_begin().Eric Anholt3-22/+7
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>
2012-10-26i965: Rename misleading "active" field of brw->query.Eric Anholt2-5/+5
"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>
2012-10-26r600g: advertise 32 streamout vec4 outputsMarek Olšák1-1/+1
to match the varying limit.
2012-10-26softpipe: remove extraneous whitespaceBrian Paul1-2/+0
2012-10-26gallivm/llvmpipe: fix 64-bit %ll format compiler warnings for mingw32Brian Paul2-8/+10
Use the PRIx64 and PRIu64 format macros from inttypes.h. We made a similar change in prog_print.c in df2d81ea59993a77bd1f1ef96c5cf19ac692d5f7.
2012-10-26r600g: advertise 32 fragment shaders inputs, not 34Marek Olšák1-4/+1
2012-10-26graw/fs-test: Use user constant buffers.José Fonseca1-56/+14
Much simpler. More interesting.
2012-10-26trace: Flush before drawing.José Fonseca3-0/+11
2012-10-26graw: Ensure new members are zeroed.José Fonseca15-0/+19
Several new state members were added, and they were not being zeroed, causing random crashes.
2012-10-26tests/graw: Update occlusion query example.José Fonseca1-4/+4
2012-10-26radeonsi: Handle TGSI_SEMANTIC_FACE.Michel Dänzer2-1/+31
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>
2012-10-26radeonsi: Handle TGSI_SEMANTIC_BCOLOR.Michel Dänzer5-15/+75
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>
2012-10-26radeonsi: Don't snoop context state while building shaders.Michel Dänzer3-17/+27
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>
2012-10-26radeon/llvm: Add intrinsic for reading SI FRONT_FACE VGPR in the pixel shader.Michel Dänzer2-0/+6
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2012-10-26r600g: split cayman common state out into a shared functionAlex Deucher3-16/+35
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>
2012-10-26r600g: emit some additional regs on caymanAlex Deucher1-0/+54
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>
2012-10-26r600g: there are 16 const buffer size regs for each shader stageAlex Deucher1-2/+19
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>
2012-10-26r600g: rework evergreen_init_common_regs()Alex Deucher1-40/+33
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>
2012-10-26r600g/compute: always CONTEXT_CONTROL packet at start of CSAlex Deucher2-0/+10
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>
2012-10-26tools/trace: More helpful message when no args are provided.José Fonseca1-13/+13
2012-10-26scons: Build xlib swrast too.José Fonseca2-0/+51
Helpful for debugging.
2012-10-26vl: fix the dri winsys helper screen initChristian König1-0/+2
Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-10-25tests: Use printf instead of debug_printf in u_format_compatible_test.Vinson Lee1-1/+1
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>
2012-10-26r300g: fix texture border color for sRGB formatsMarek Olšák1-4/+18
NOTE: This is a candidate for the stable branches.
2012-10-25glsl: Allow ir_if in the linker's move_non_declarations function.Kenneth Graunke1-0/+1
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>
2012-10-25i965/vs: Preserve the type when copy propagating into an instruction.Kenneth Graunke1-0/+1
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>
2012-10-25i965/vs: Don't lose the MRF writemask when doing compute-to-MRF.Kenneth Graunke1-0/+1
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>
2012-10-25glcpp: Don't use infinite lookhead for #define differentiation.Kenneth Graunke2-12/+20
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>
2012-10-25i965/vs: Fix debug dumping of VS push constants.Kenneth Graunke1-1/+3
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>
2012-10-25mesa/tests: Add ES3.0 dispatch table sanity testMatt Turner1-0/+149
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>
2012-10-25Split dispatch sanity's validate_function test into twoMatt Turner1-0/+11
Will be useful for the next patch, adding GLES 3 testing. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2012-10-25dispatch_sanity: print names of functions that shouldnt be in dispatch table.Paul Berry1-1/+9
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>
2012-10-25shared-glapi: implement _glapi_get_proc_name().Paul Berry3-2/+27
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>
2012-10-25src/glsl/tests/Makefile.am: Specify -I... in AM_CPPFLAGSMatt Turner1-4/+1
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>
2012-10-25ralloc: Annotate printf functions with PRINTFLIKE(...)Matt Turner2-11/+6
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>
2012-10-25mesa/st: Don't use 4bits for GL_UNSIGNED_BYTE_3_3_2(_REV)José Fonseca1-0/+2
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>
2012-10-25trace: Fix dumping of set_constant_buffer method.José Fonseca3-9/+21
2012-10-24glsl_to_tgsi: set correct register type for array and structure elementsBryan Cain1-2/+19
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.
2012-10-24r600g: force bank_swizzle if already setVincent Lejeune2-0/+4
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
2012-10-24r600g: rewrite tgsi-to-llvm load-input to handle fragcoordVincent Lejeune2-42/+84
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
2012-10-24nv50/ir/tgsi: fix srcMask for TXP with SHADOW1DChristoph Bumiller1-1/+1
2012-10-24mesa: Use MIN instead of CLAMP for unsigned source dataIan Romanick1-108/+108
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>
2012-10-24st/mesa: Fix assertions for copying texture image to finalized miptree.Michel Dänzer1-1/+4
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>
2012-10-24gallium/docs: fix sphinx warningAndreas Boll1-1/+1
src/gallium/docs/source/context.rst:495: WARNING: malformed hyperlink target. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-23_mesa_create_exec_table: GLES3 fixes.Paul Berry10-43/+68
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>
2012-10-23_mesa_create_exec_table(): deprecate ProgramStringARB.Paul Berry1-1/+3
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>
2012-10-23_mesa_create_exec_table: de-deprecate GetPointerv.Paul Berry1-1/+3
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>
2012-10-23glapi: Alias VertexAttribDivisor and VertexAttribDivisorARB.Paul Berry1-1/+2
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>