summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-15glsl/tests: Add a test for properties of sampler types.HEADmasterKenneth Graunke2-0/+114
For each sampler type, this tests that: - The base type is GLSL_TYPE_SAMPLER. - The dimensionality is set correctly. - The returned data type is correct. - The sampler_array and sampler_shadow flags are set correctly. - sampler_coordinate_components() returns the correct value. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <idr@freedesktop.org>
2013-09-16st/mesa: don't dereference stObj->pt if NULLDave Airlie1-1/+1
It seems a user app can get us into this state, I trigger the fail running fbo-maxsize inside virgl, it fails to create the backing storage for the texture object, but then segfaults here when it should fail the completeness test. Cc: "9.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-09-16nouveau: fix regression since float comparison instructions (v2)Dave Airlie6-14/+14
Fix the return type and allow src and dst types for comparison to be separate, this at least fixes the two test cases I've written. v2: drop the u32->s32 change Acked-by: Christoph Bumiller <christoph.bumiller@speed.at> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-09-15vdpau/decode: Check max width and max height.Rico Schüller1-0/+20
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-09-14freedreno: PIPE_TRANSFER_DISCARD_WHOLE_RESOURCERob Clark1-17/+43
When the old contents do not need to be preserved, it is faster to create a new backing bo rather than stall. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno/a3xx: fix VFD_INDEX_MAX overflowRob Clark1-1/+1
max_index may be 0xffffffff. The hardware does not need 1 + max_index (although it does not hurt unless max_index wraps around to zero). Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno: add debug option to disable GMEM bypassRob Clark3-1/+3
Useful for debugging. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno/a3xx: handle front_ccwRob Clark5-17/+14
Used by supertuxkart. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno/a3xx: stencil fixesRob Clark9-7/+30
For mem->gmem we don't sample depth/stencil as it's native type. So we need to setup the swizzle state for the sampler based on the format used for sampling. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno/a3xx: alpha-testRob Clark7-7/+29
Needed by some games, like etuxracer and supertuxkart which use alpha test rather than blending, to handle texture transparency. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno/a3xx/compiler: implement SUBRob Clark1-3/+11
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno/a3xx: use INDIRECT state load for shadersRob Clark3-8/+29
With a debug option to force DIRECT (mainly to make it easier for capturing cmdstream dumps). Using INDIRECT for large shaders at least makes a noticable reduction in CPU load, which helps for CPU limited games. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno: avoid stalling at ringbuffer wraparoundRob Clark2-22/+41
Because of how the tiling works, we can't really flush at arbitrary points very easily. So wraparound is handled by resetting to top of ringbuffer. Previously this would stall until current rendering is complete. Instead cycle through multiple ringbuffers to avoid a stall. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno: emit markers to scratch registersRob Clark4-0/+33
Emit markers by writing to scratch registers in order to "triangulate" gpu lockup position from post-mortem register dump. By comparing register values in post-mortem dump to command-stream, it is possible to narrow down which DRAW_INDX caused the lockup. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno: split out WFI helperRob Clark5-10/+12
Mostly just to give an easy debug/instrumentation point. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno: fd_draw helperRob Clark6-52/+55
Have a single helper that all draws come through.. mainly for a convenient debug and instrumentation point. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno/a3xx: fix gpu lockup in some piglit testsRob Clark1-1/+1
The varying-out config comes from the inputs of the frag shader (so that we aren't exporting unneeded varyinges). The varyings-count should come from the frag shader as well, to avoid a discrepency in configuration and resulting gpu lockup. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno/a3xx/compiler: add LITRob Clark1-3/+142
Needed by glxgears and etuxracer ;-) Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-14freedreno: multi-slice resources (cubemap, mipmap, etc)Rob Clark15-52/+141
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2013-09-13glsl/builtins: Fix {texture1D,texture2D,shadow1D}ArrayLod availibility.Paul Berry1-5/+5
These functions are defined in EXT_texture_array, which makes no mention of what shader types they should be allowed in. At the time EXT_texture_array was introduced, functions ending in "Lod" were available only in vertex shaders, however this restriction was lifted in later spec versions and extensions. We already have the function lod_exists_in_stage() for figuring out whether functions ending in "Lod" should be available, so just re-use that. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-09-13i965: Use brw_stage_state for WM data as well.Kenneth Graunke13-93/+71
This gets the VS, GS, and PS all using the same data structure. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-09-13i965: Increase the size of brw_stage_state::surf_offset.Kenneth Graunke1-1/+1
Since BRW_MAX_WM_SURFACES is greater than BRW_MAX_VEC4_SURFACES, the existing array isn't large enough to be used by the WM. Increasing it will make it possible to share them. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-09-13i965: Add comments to the new brw_state_state structure's fields.Kenneth Graunke1-0/+10
These are largely based on the similar fields in brw->wm. v2: Add a better comment than "Scratch buffer". Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Paul Berry <stereotype441@gmail.com>
2013-09-13mesa: Rename MESA_shader_integer_mix to EXT_shader_integer_mixIan Romanick8-17/+20
Everyone at the Khronos meeting was as surprised that GLSL didn't already support this as we were. Several vendors said they'd ship it, but there didn't seem to be enough interest to put in the effort to make it ARB or KHR. v2: Fix a couple typos and rename the spec file to EXT_shader_integer_mix.spec. Suggested by Roland. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-09-13radeonsi: fix and enable transform feedback for CIKMarek Olšák4-28/+40
The CP_STRMOUT_CNTL register was moved again. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-13radeonsi: fix gl_InstanceID with non-zero start_instanceMarek Olšák1-3/+4
start_instance doesn't affect gl_InstanceID. There's no piglit test, but it's kinda obvious the code was wrong. Reviewed-by: Christian König <christian.koenig@amd.com>
2013-09-13gallium: comment that INSTANCEID doesn't include start_instanceMarek Olšák1-1/+1
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-09-13radeonsi: enable streamout AKA transform feedback for SIMarek Olšák1-10/+4
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: implement streamout shader supportMarek Olšák3-15/+276
The shader is responsible for writing to streamout buffers using the TBUFFER_STORE_FORMAT_* instructions. The locations of some input SGPRs and VGPRs are assigned dynamically, because the input SGPRs controlling streamout are not declared if they are not needed, decreasing the indices of all following inputs. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: implement glDrawTransformFeedback functionalityMarek Olšák3-0/+30
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: fix streamout queriesMarek Olšák1-4/+5
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: implement streamout flush properlyMarek Olšák1-1/+7
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: bind streamout buffers to VGT and the vertex shaderMarek Olšák4-8/+81
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: handle rasterizer_discard and set GS_OUT_PRIM_TYPEMarek Olšák3-1/+31
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: initialize the first CS like any otherMarek Olšák5-5/+15
So that the "init" state is always emitted first and not later in draw_vbo. This fixes streamout where the "init" state, which disables streamout, was emitted in draw_vbo after streamout was enabled. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: integrate shared streamout stateMarek Olšák7-38/+20
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeon: don't emit streamout state if there are no streamout buffersMarek Olšák1-0/+2
This could happen if set_stream_output_targets is called twice in a row without a draw call in between. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeon: don't emit VGT_STRMOUT_BUFFER_BASE on SIMarek Olšák1-31/+54
The register doesn't exist on SI. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-12mesa: Disallow relinking if a program is used by an active XFB object.Kenneth Graunke3-7/+47
Paused transform feedback objects may refer to a program other than the current program. If any active objects refer to a program, LinkProgram must reject the request to relink. The code to detect this is ugly since _mesa_HashWalk is awkward to use, but unfortunately we can't use hash_table_foreach since there's no way to get at the underlying struct hash_table (and even then, we'd need to handle locking somehow). Fixes the last subcase of Piglit's new ARB_transform_feedback2 api-errors test. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-09-12mesa: Reject ResumeTransformFeedback if the wrong program is bound.Kenneth Graunke1-0/+11
This is actually a pretty important error condition: otherwise, you could set up transform feedback with one program, and resume it with a program that generates a completely different set of outputs. Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-09-12mesa: Track the vertex program active at BeginTransformFeedback() time.Kenneth Graunke2-0/+8
The next few patches will use this for API error checking. All of the drivers appear to CALLOC_STRUCT transform feedback objects, so this should be properly NULL initialized on creation. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-09-12mesa: Disallow TransformFeedbackVaryings when active.Kenneth Graunke1-0/+10
Fixes a subcase of Piglit's new ARB_transform_feedback2 api-errors test. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-09-12radeon/uvd: move more logic into the common filesChristian König6-40/+23
Move the code back into the common UVD files since we now have base structures for R600 and radeonsi. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-12radeon/uvd: use more sane defaults for bitstream buffer sizeChristian König1-1/+3
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-09-12os: First check for __GLIBC__ and then for PIPE_OS_BSDAndreas Boll1-4/+4
Fixes FTBFS on kfreebsd-* Debian GNU/kFreeBSD doesn't provide getprogname() since it uses stdlib.h from glibc. Instead it provides program_invocation_short_name from glibc. You can find the same order in src/mesa/drivers/dri/common/xmlconfig.c Cc: "9.2" <mesa-stable@lists.freedesktop.org> Tested-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-09-12llvmpipe: Remove the special path for TGSI_OPCODE_EXP.José Fonseca3-72/+30
It was wrong for EXP.y, as we clamped the source before computing the fractional part, and this opcode should be rarely used, so it's not worth the hassle.
2013-09-12trace: Several enhancements to dump_state.pyJosé Fonseca1-18/+112
- Handle more calls - Handle more state - Try to normalize the output a bit, to eliminate spurious differences
2013-09-12trace: Support bigger TGSI shaders.José Fonseca1-1/+1
Trivial.
2013-09-11glsl: Use sampler_coordinate_components instead of passing it by hand.Kenneth Graunke1-450/+450
We used to pass the number of components actually used for the coordinate (rather than padding, shadow comparitors, and projectors) by hand, specifying it on every _texture() call. The new helper function can just compute this, eliminating a lot of potential mistakes. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-09-11glsl: Add a new glsl_type::sampler_coordinate_components() function.Kenneth Graunke2-0/+47
This computes the number of components necessary to address a sampler based on its dimensionality. It will be useful for texturing built-ins. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>