summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* r200: get rid of old gart memory functions from old dri1Roland Scheidegger2012-08-012-32/+0
| | | | Those functions are SO dead.
* radeon/r200: fix bogus clearsRoland Scheidegger2012-08-012-52/+22
| | | | | | | | | There were several problems with these functions (which are a remnant of dri1 hyperz mostly - should bring it back somehow someday). First, it would always do a swrast clear if the buffer to clear was a fbo. Second, for buffers we wouldn't handle the clear (I guess aux/accum?) we would actually still have tried to clear that later even when we already cleared it with swrast.
* radeon/r200: fix bogus assert/scissor wrt width/height 2048Roland Scheidegger2012-08-012-8/+8
| | | | | | | | | This addresses one issue raised in bug #51658 discovered by Eugene St Leger. The assert is bogus since there's no problem with texture width/height being 2048 (the width/height programmed is width/height minus one). OTOH though the programmed size for scissor rect should be width/height minus one too otherwise bad things may happen (as it is inclusive, and there's not enough bits for more than a value of 2047).
* radeon/llvm: fix calculation of max register numberChristian König2012-08-011-1/+1
| | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeon/llvm: Add pseudo-support for 64-bit immediate types on SITom Stellard2012-07-312-0/+23
| | | | | | | | SI does not support 64-bit immediates natively, but llvm will generate i64 immediates when indexing loads and stores (since SI has 64-bit pointers). The i64 indices will always be small enough to fit into 32-bits (i.e. the high 32 bits will always be all zeros), so we can treat these index values as 32-bits.
* radeon/llvm: Fix incorrect return value in SelectADDRReg()Tom Stellard2012-07-311-1/+1
| | | | We need to return true when we match the pattern.
* radeon/llvm: Move SMRD IMM pattern before SMRD SGPR patternTom Stellard2012-07-311-7/+6
| | | | | | | In tablegen, if two patterns match, the one that comes first in the file is given preference. We want the SMRD IMM pattern to be given preference, because it encodes the pointer offset in its immediate field, which saves us an add instruction.
* glsl: Reject linking shaders with too many uniform blocks.Eric Anholt2012-07-311-0/+34
| | | | | | | Part of fixing piglit maxblocks. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Return -1 for glGetUniformLocation on UBOs.Eric Anholt2012-07-311-0/+10
| | | | | | | Fixes piglit ARB_uniform_buffer_object/getuniformlocation. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Assign array and matrix stride values according to std140 layout.Eric Anholt2012-07-311-4/+15
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add support for default layout qualifiers for uniforms.Eric Anholt2012-07-315-38/+99
| | | | | | | | | | | I ended up having to add rallocing of the ast_type_qualifier in order to avoid pulling in ast.h for glsl_parser_extras.h, because I wanted to track an ast_type_qualifier in the state. Fixes piglit ARB_uniform_buffer_object/row-major. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Merge UBO layout qualifiers in a qualifier list.Eric Anholt2012-07-311-1/+23
| | | | | | | | | | Yes, you get to say things like "layout(row_major, column_major)" and get column major. Part of fixing piglit ARB_uniform_buffer_object/row_major. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for GL_ARB_ubo's glGetActiveUniformName().Eric Anholt2012-07-311-0/+39
| | | | | | | | | | | | This is like a stripped-down version of glGetActiveUniform that just returns the name, since the other return values (type and size) of that function are now meant to be handled with glGetActiveUniformsiv(). Fixes piglit ARB_uniform_buffer_object/getactiveuniformname Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for most of the other pnames of glGetActiveUniformBlockiv().Eric Anholt2012-07-311-0/+30
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for getting active uniform block names.Eric Anholt2012-07-311-0/+47
| | | | | | | Fixes piglit ARB_uniform_buffer_object/getactiveuniformblockname. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for glUniformBlockBinding() and the API to get it back.Eric Anholt2012-07-311-0/+95
| | | | | | | Fixes piglit ARB_uniform_buffer_object/uniformbufferbinding. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Incorporate all UBO language changes into GLSL 1.40.Eric Anholt2012-07-311-0/+4
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support for glGetProgramiv pnames for UBOs.Eric Anholt2012-07-311-0/+29
| | | | | | | | | | Fixes piglit ARB_uniform_buffer_object/getprogramiv. v2: Add extension checks. v3: Appease MSVC. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Refactor #version validation to be more future-proof.Kenneth Graunke2012-07-313-38/+16
| | | | | | | | | | | | | | | | | The previous implementation required a flag in _mesa_glsl_parse_state and line of code to initialize it for every version of the shading language we intend to support. As we look to add 150, 330, 400, 410, 420, and beyond, this gets rather unwieldy. This patch retains the switch statement (to reject, say, #version 111), but removes all the bits. Code to check for ctx->API == API_OPENGL_CORE could easily be added to the 110 and 120 cases to reject those. v2: Use _mesa_is_desktop_gl to preserve the existing behavior in the presence of the new API_OPENGL_CORE enumeration. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> [v1]
* i965: Add support for GL_SKIP_DECODE_EXT on other SRGB formats.Eric Anholt2012-07-311-8/+3
| | | | | | | | | | | Fixes some failures in getteximage-formats. v2: Remove stray include, and drop extra test for encoding == GL_SRGB -- _mesa_get_srgb_format_linear() returns the same format if it wasn't SRGB. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48120 Reviewed-by: Kenneth Graunke <[email protected]> (v1) NOTE: This is a candidate for the 8.0 branch.
* glsl: Fix #pragma invariant(all) language version check.Kenneth Graunke2012-07-311-1/+1
| | | | | | | | | | | | | It was using state->Const.GLSL_100ES, which is set if the driver supports ARB_ES2_compatibility or we're in ES2 mode. Instead, it should use state->language_version, as that represents the actual GLSL version of the shader being compiled. Since the correct logic is < 120 && !100, just make it == 110. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Support glGetString(GL_SHADING_LANGUAGE_VERSION) for >= 1.40.Kenneth Graunke2012-07-311-0/+10
| | | | | | | | | This will need to get refactored when we add support for core profiles or forward-compatible contexts, but we may as well have it in the meantime. This allows us to override the GLSL version and experiment. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* ir_to_mesa: make size_swizzles[] array static constBrian Paul2012-07-311-1/+1
|
* Move installing osmesa.pc to drivers/osmesaJon TURNEY2012-07-314-9/+4
| | | | | | | | | | | | | | | | Move installing osmesa.pc to drivers/osmesa, where it belongs better This also restores the installation of gl.pc if we are building osmesa at the same time as libGL, which was broken in commit 39785488 when the .pc installation was converted to automake v2: Remove HAVE_OSMESA_DRIVER automake conditional, it's now pointless as we will only be building in the drivers/osmesa directory if the condition it checked was true. Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium/util: Use GCC built-in functions for NaN and infinity.Vinson Lee2012-07-301-0/+5
| | | | | | | | | | This patch fixes this build failure with Intel Compiler. src/gallium/auxiliary/util/u_format_tests.c(903): error: floating-point operation result is out of range {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x7c01), UNPACKED_1x1( NAN, 0.0, 0.0, 1.0)}, Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mesa: don't enable legacy GL functions when using API_OPENGL_COREJordan Justen2012-07-304-167/+232
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* intel: add support for using API_OPENGL_COREJordan Justen2012-07-301-1/+1
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* meta: add support for using API_OPENGL_COREJordan Justen2012-07-301-1/+1
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: add support for using API_OPENGL_COREJordan Justen2012-07-301-8/+7
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add support for using API_OPENGL_COREJordan Justen2012-07-3011-19/+29
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add api check functionsJordan Justen2012-07-301-0/+20
| | | | | | | | | These functions make it easier to check for multiple API types. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: add API_OPENGL_CORE apiJordan Justen2012-07-301-2/+3
| | | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Fix ir_last_opcode value.Ian Romanick2012-07-301-1/+1
| | | | | | | | | | Now that ir_quadop_vector exists, ir_last_binop and ir_last_opcode are no longer the same. Only one place currently uses this enumeration, and already handles ir_quadop_vector correctly. Signed-off-by: Ian Romanick <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Olivier Galibert <[email protected]>
* glsl: Request an Nx1 type instance in ir_quadop_vector lowering pass.Ian Romanick2012-07-301-1/+1
| | | | | | | | | | | | | No types have 0 columns. The glsl_type::get_instance method contains if ((rows < 1) || (rows > 4) || (columns < 1) || (columns > 4)) return error_type; To get a vector, use columns = 1. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Olivier Galibert <[email protected]>
* glsl: Make bvec and ivec types accessible without using get_instance.Kenneth Graunke2012-07-302-0/+10
| | | | | | | | | It's more convenient to use shortcuts like glsl_type::bvec2_type than the longwinded glsl_type::get_instance(GLSL_TYPE_BOOL, 2, 1). Signed-off-by: Ian Romanick <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Olivier Galibert <[email protected]>
* radeon/llvm: Cleanup AMDIL.hTom Stellard2012-07-304-91/+26
|
* radeon/llvm: Rename all AMDIL* classes to AMDGPU*Tom Stellard2012-07-3030-496/+496
|
* radeon/llvm: Merge AMDILSubtarget into AMDGPUSubtargetTom Stellard2012-07-3025-324/+156
|
* radeon/llvm: Merge AMDILTargetLowering class into AMDGPUTargetLoweringTom Stellard2012-07-3011-241/+144
|
* radeon/llvm: Remove IL_cmp DAG nodeTom Stellard2012-07-304-502/+2
|
* radeon/llvm: Cleanup and reorganize AMDIL .td filesTom Stellard2012-07-3013-2303/+335
|
* radeon/llvm: Remove lowering code for unsupported featuresTom Stellard2012-07-308-805/+50
| | | | e.g. function calls, load/store from stack
* radeon/llvm: Remove AMDILVersion.tdTom Stellard2012-07-302-59/+0
|
* radeon/llvm: Remove AMDILAlgorithms.tppTom Stellard2012-07-302-94/+19
|
* radeon/llvm: Merge AMDILInstrInfo.cpp into AMDGPUInstrInfo.cppTom Stellard2012-07-3012-693/+512
|
* radeon/llvm: Merge AMDILRegisterInfo into AMDGPURegisterInfoTom Stellard2012-07-3012-283/+69
|
* radeon/llvm: Change the tablegen target from AMDIL to AMDGPUTom Stellard2012-07-3014-107/+119
|
* i965: Support MESA_FORMAT_SIGNED_RGBA_16.Kenneth Graunke2012-07-301-1/+1
| | | | | | | | | | | | | | | | The hardware supports this format with no known quirks, so we may as well enable it. Alpha blending is not supported until Sandybridge, but as far as I can tell, OpenGL doesn't require alpha blending on SNORM formats. Plus, we already expose R8G8B8A8_SNORM which has a similar restriction. Fixes 6 piglit texwrap-2D-*SNORM* cases, gl-3.1/required-sized-texture-formats, and 10 oglconform snorm-textures subcases Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gbm: Fix build for wayland includeElvis Lee2012-07-301-0/+1
| | | | | | backends/gbm_dri.c fails to find wayland-server.h. Signed-off-by: Elvis Lee <[email protected]>
* mesa: fix _math_matrix_copy(), againBrian Paul2012-07-301-1/+1
| | | | | The matrix is 16 GLfloats in size. Since from->inv is just a pointer (not an array), sizeof(*from->inv) wasn't right.