summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* exec_list: Make various places use the new length() method.Connor Abbott2014-07-156-23/+9
| | | | | | | | | | Instead of hand-rolling it. v2 [mattst88]: Rename get_size to length. Expand comment in ir_reader. Reviewed-by: Ian Romanick <[email protected]> [v1] Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Connor Abbott <[email protected]>
* exec_list: Add a function to give the length of a list.Connor Abbott2014-07-151-0/+20
| | | | | | | | | v2 [mattst88]: Remove trailing whitespace. Rename get_size to length. Mark as const. Reviewed-by: Ian Romanick <[email protected]> [v1] Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Connor Abbott <[email protected]>
* exec_list: Add a prepend function.Connor Abbott2014-07-151-1/+19
| | | | | | | | | | This complements the existing append function. It's implemented in a rather simple way right now; it could be changed if performance is a concern. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Connor Abbott <[email protected]>
* mesa: Don't allow GL_TEXTURE_{LUMINANCE,INTENSITY}_* queries outside compat ↵Ian Romanick2014-07-151-2/+7
| | | | | | | | | | | | | | | | | | profile There are no queries for GL_TEXTURE_LUMINANCE_SIZE, GL_TEXTURE_INTENSITY_SIZE, GL_TEXTURE_LUMINANCE_TYPE, or GL_TEXTURE_INTENSITY_TYPE in any version of OpenGL ES or desktop OpenGL core profile. NOTE: Without changes to piglit, this regresses required-sized-texture-formats. v2: Rebase on different initial change. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "10.2 <[email protected]>
* mesa: Don't allow GL_TEXTURE_BORDER queries outside compat profileIan Romanick2014-07-151-0/+2
| | | | | | | | | | | | | There are no texture borders in any version of OpenGL ES or desktop OpenGL core profile. Fixes piglit's gl-3.2-texture-border-deprecated. v2: Rebase on different initial change. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "10.2 <[email protected]>
* mesa: Handle uninitialized textures like other textures in ↵Ian Romanick2014-07-151-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | get_tex_level_parameter_image Instead of catching the special case early, handle it by constructing a fake gl_texture_image that will cause the values required by the OpenGL 4.0 spec to be returned. Previously, calling glGenTextures(1, &t); glBindTexture(GL_TEXTURE_2D, t); glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, 0xDEADBEEF, &value); would not generate an error. Anuj: Can you verify this does not regress proxy_textures_invalid_size? Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Suggested-by: Brian Paul <[email protected]> Cc: "10.2" <[email protected]> Cc: Anuj Phogat <[email protected]>
* i965/fs: Relax interference check in register coalescing.Matt Turner2014-07-151-11/+12
| | | | | | | | | | | | | A similar attempt was made in commit 5ff1e446 and was reverted in commit a39428cf after causing a regression in an ES 3 conformance test. The test still passes after this commit. total instructions in shared programs: 1994827 -> 1992858 (-0.10%) instructions in affected programs: 128247 -> 126278 (-1.54%) GAINED: 0 LOST: 1 Acked-by: Kenneth Graunke <[email protected]>
* i965/fs: Perform CSE on sends-from-GRF rather than textures.Matt Turner2014-07-151-1/+1
| | | | | | | | | Should potentially allow a few more cases, while avoiding doing CSE on texture operations on Gen <= 6 with the MRF. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80211 Reviewed-by: Kenneth Graunke <[email protected]> Tested-by: lu hua <[email protected]>
* glsl: Update expression types after rebalancing the tree.Matt Turner2014-07-151-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we saw a tree that looked like vec3 / \ vec3 float / \ vec3 float / \ vec3 float We would see that all of the expression types were vec3, and then rebalance to vec3 / \ vec3 vec3 <-- should be float / \ / \ vec3 float float float This patch adds code to visit the rebalanced tree and update the expression types from the bottom up. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80880 Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Add callback_leave to ir_hierarchical_visitor.Matt Turner2014-07-153-73/+126
|
* i965: Initialize new chunks of realloc'd memory.Matt Turner2014-07-151-0/+4
| | | | | | | Otherwise we'd compare uninitialized pointers with NULL and dereference, leading to crashes. Reviewed-by: Kenneth Graunke <[email protected]>
* radeon/llvm: Fix LLVM diagnostic error reportingTom Stellard2014-07-151-7/+4
| | | | | | | We were trying to print the error message after disposing the message object. Tested-by and Reviewed-by: Aaron Watry <[email protected]>
* util/tgsi: Fix ureg_EMIT/ENDPRIM prototype.José Fonseca2014-07-151-2/+2
| | | | | | | | 0cbefc1bea703378381afff946e30c27a21f191d added a source argument to EMIT/ENDPRIM, but it did not update tgsi_ureg accordingly, causing all users of ureg_EMIT/ENDPRIM to fail at runtime with an assertion failure. Trivial.
* glapi: Use GetProcAddress instead of dlsym on Windows.Vinson Lee2014-07-141-0/+4
| | | | | | | | | | | | This patch fixes this MinGW build error. glapi_gentable.c: In function '_glapi_create_table_from_handle': glapi_gentable.c:123:9: error: implicit declaration of function 'dlsym' [-Werror=implicit-function-declaration] *procp = dlsym(handle, symboln); ^ Signed-off-by: Vinson Lee <[email protected]> Acked-by: Brian Paul <[email protected]>
* ilo: raise texture size limitsChia-I Wu2014-07-152-17/+9
| | | | | Report the hardware limits now that max-texture-size piglit test has been fixed.
* ilo: move away from drm_intel_bo_alloc_tiledChia-I Wu2014-07-155-304/+359
| | | | | We want to know the exact sizes of the BOs, and the driver has the knowledge to do so. Refactoring of the resource allocation code is needed though.
* radeonsi: partially revert "switch descriptors to i32 vectors"Marek Olšák2014-07-141-0/+12
| | | | It indeed breaks LLVM 3.4.2.
* i965/vec4: Invalidate live intervals in opt_cse, not _local.Matt Turner2014-07-141-3/+3
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/vec4: Move aeb list into opt_cse_local.Matt Turner2014-07-142-7/+7
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Invalidate live intervals in opt_cse, not _local.Matt Turner2014-07-141-3/+3
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Move aeb list into opt_cse_local.Matt Turner2014-07-142-7/+7
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Fix aggregates with dynamic initializers.Cody Northrop2014-07-141-3/+14
| | | | | | | | | | | | | | | | | | | | | Vectors are falling in to the ir_dereference_array() path. Without this change, the following glsl aborts the debug driver, or gets the wrong answer in release: mat2x2 a = mat2( vec2( 1.0, vertex.x ), vec2( 0.0, 1.0 ) ); Also submitting piglit tests, will reference in bug. v2: Rebase on Mesa master. v3: Remove unneeded check for arrays, which are covered by process_array_constructor(), recommended by Timothy Arceri. Signed-off-by: Cody Northrop <[email protected]> Reviewed-by: Courtney Goeltzenleuchter <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79373
* Avoid mesa_dri_drivers import lib being installedJon TURNEY2014-07-131-2/+1
| | | | | | | | | | | | | | On Cygwin and MinGW, linking a shared library also generates an import library Use a wildcard which also matches the name of the megadriver import lib, mesa_dri_drivers.dll.a, so that is also removed after megadriver symlinks are created (This then matches src/gallium/targets/dri/Makefile.am, which already does things this way) Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* i965/vec4: Silence warnings about unhandled interpolation opsChris Forbes2014-07-131-0/+3
| | | | Signed-off-by: Chris Forbes <[email protected]>
* docs: Mark off ARB_gpu_shader5 interpolation functions for i965Chris Forbes2014-07-131-1/+1
| | | | Signed-off-by: Chris Forbes <[email protected]>
* i965/fs: add support for ir_*_interpolate_at_* expressionsChris Forbes2014-07-132-2/+150
| | | | | | | | | | | | | | SIMD8-only for now. V5: - Fix style complaints - Move prototype to be with other oddball emit functions - Use unreachable() instead of assert() where possible V6: - Describe what is happening with the clamping - Add reg_width to make some expressions clearer Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Skip channel expressions splitting for interpolationChris Forbes2014-07-131-0/+25
| | | | | | | | The backend will have to do a message send, so we want to keep these in one piece, just like texture ops. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: add generator support for pixel interpolator queryChris Forbes2014-07-134-0/+59
| | | | | | | | | | V5: - Split into separate opcodes - Pass message data in src1 immediate - Put noperspective bit in fs_inst rather than adding any junk to backend_instruction Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: add low-level support for send to pixel interpolatorChris Forbes2014-07-132-0/+38
| | | | | Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/disasm: add support for pixel interpolator messagesChris Forbes2014-07-131-0/+17
| | | | | | | V3: Rework for brw_inst changes Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add message descriptor bit definitions for pixel interpolatorChris Forbes2014-07-132-0/+16
| | | | | | | These got lost in the big brw_inst shakeup. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/disasm: Disassemble indirect sends more properlyChris Forbes2014-07-121-162/+174
| | | | | | | | | | | - Don't try to disassemble send's src1 as a descriptor if it's not an immediate. - In the same case, show src1 as an operand (makes it easier to see bogus register regions, etc -- the hardware is very fussy) Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Avoid crashing while dumping vec4 insn operandsChris Forbes2014-07-121-1/+4
| | | | | | | | We'd otherwise go looking into virtual_grf_sizes for things that aren't in there at all. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* i965: Fix two broken asserts in brw_eu_emitChris Forbes2014-07-121-2/+2
| | | | | | | These were looking in the wrong field. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: add new interpolateAt* builtin functionsChris Forbes2014-07-121-0/+67
| | | | | | | | | | | | V2: - Don't assume everyone wants interpolateAtSample() lowered to interpolateAtOffset. It turns out this isn't what we want most of the time for i965. Lowering can be added later in an ir pass which drivers opt into, rather than bolting it straight into the builtin definition. - Only expose the interpolateAt* builtins in the fragment language. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* glsl: add new expression types for interpolateAt*Chris Forbes2014-07-128-2/+79
| | | | | | | Will be used to implement interpolateAt*() from ARB_gpu_shader5 Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* allow builtin functions to require parameters to be shader inputsChris Forbes2014-07-122-0/+24
| | | | | | | | | | | | | The new interpolateAt* builtins have strange restrictions on the <interpolant> parameter. - It must be a shader input, or an element of a shader input array. - It must not include a swizzle. V2: Don't abuse ir_var_mode_shader_in for this; make a new flag. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* radeonsi: rename definitions of shader limitsMarek Olšák2014-07-117-44/+57
| | | | Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: switch descriptors to i32 vectorsMarek Olšák2014-07-111-13/+16
| | | | | | This is a follow-up to the commit which adds texture fetches with offsets. Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: properly implement texture opcodes that take an offsetMarek Olšák2014-07-111-84/+104
| | | | | | | | | | | | Instead of using intr_name in lp_build_tgsi_action, this selects the names with a switch statement in the emit function. This allows emitting llvm.SI.sample for instructions without offsets and llvm.SI.image.sample.*.o otherwise. This depends on my LLVM changes. When LLVM 3.5 is released, I'll switch all texture instructions to the new intrinsics.
* radeonsi: fix texture fetches with derivatives for 1DArray and 3D texturesMarek Olšák2014-07-111-4/+30
|
* radeonsi: fix samplerCubeShadow with biasMarek Olšák2014-07-111-6/+6
| | | | | | Pack the depth value before overwriting it with cube coordinates. Cc: [email protected]
* st/mesa: fix samplerCubeShadow with biasMarek Olšák2014-07-111-1/+7
| | | | | | | It has 5 coordinates: (x,y,z,depth,lodbias) Cc: [email protected] Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: fix crash in st/mesa after deleting a VAOMarek Olšák2014-07-114-33/+33
| | | | | | | | | | This happens when glGetMultisamplefv (or any other non-draw function) is called, which doesn't invoke the VBO module to update _DrawArrays and the pointer is invalid at that point. However st/mesa still dereferences it to setup vertex buffers ==> crash. Reviewed-by: Brian Paul <[email protected]>
* configure: Cygwin requires _XOPEN_SOURCE >= 700 to prototype strndup()Jon TURNEY2014-07-111-1/+1
| | | | | | | Adjust definition of _XOPEN_SOURCE appropriately for use of strndup() added with commit da3a47d6 Signed-off-by: Jon TURNEY <[email protected]>
* gallium/docs: minor clarification for TXQ instructionBrian Paul2014-07-101-0/+4
| | | | Reviewed-by: Ilia Mirkin <[email protected]>
* softpipe: fix sp_get_dims() for PIPE_BUFFERBrian Paul2014-07-101-6/+10
| | | | | | | | | | | | Before, we were checking the level against view->u.tex.last_level but level is not valid for buffers. Plus, the aliasing of the view->u.tex view->u.buf members (a union) caused the level checking arithmetic to be totally wrong. The net effect is we always returned early for PIPE_BUFFER size queries. This fixes the piglit "textureSize 140 fs samplerBuffer" test. Reviewed-by: Roland Scheidegger <[email protected]>
* glsl/glcpp: move macro declaration before code to fix MSVC buildBrian Paul2014-07-101-1/+2
| | | | Reviewed-by: Carl Worth <[email protected]>
* nvc0/ir: add support for interpolating with non-default settingsIlia Mirkin2014-07-093-1/+94
| | | | Signed-off-by: Ilia Mirkin <[email protected]>
* gallium: add INTERP_* opcodes to support interpolateAt*Ilia Mirkin2014-07-093-1/+32
| | | | | | Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>