summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Track UBO block names in the symbol table.Kenneth Graunke2013-01-183-3/+18
| | | | | | | | | | | | | | | | | | | | The GLSL 1.40 spec says: "Uniform block names and variable names declared within uniform blocks are scoped at the program level." Track the block name in the symbol table and emit errors when conflicts exist. Fixes es3conform's uniform_buffer_object_block_name_conflict test, and fixes the piglit block-name-clashes-with-{variable,function,struct}.vert tests. NOTE: This is a candidate for the 9.0 branch. v2: Fix bad constructor initialization. Noticed by Topi Pohjolainen. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Reject row_major and column_major on non-matrix typesIan Romanick2013-01-181-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | About both row_major and column_major layout qualifiers, the GLSL spec says: "It only affects the layout of matrices." However, the OpenGL ES 3.0 conformance tests have taken this to mean it is an error use it elsewhere. This seems logical given that 'layout(row_major) vec4 foo' is probably not what the programmer meant. The only catch is dealing with structures that contain matrices. Layout qualifiers cannot be applied directly to fields of structures, so the only way to affect the layout of the fields is to apply a qualifier to the structure declaration itself. There is ongoing debate about this within Khronos, and it seems to be settling in favor of allowing the qualifiers on structures. I light of this, I have chosen to allow the qualifiers on structures but emit a warning since the usage may not be portable. Fixes gles3conform test uniform_buffer_object_layouts_not_for_matrix_type and causes no regressions. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Skip updating texgen when not doing fixed function.Eric Anholt2013-01-181-31/+39
| | | | | | | | | Between the previous commit and this one, improves GLBenchmark 2.1 offscreen performance by 0.48% +/- 0.24% (n=22, throttling outliers removed). Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Don't bother updating ff texture state if we have a fragment shader.Eric Anholt2013-01-181-1/+2
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Drop a comment about ff vertex shading and texturing.Eric Anholt2013-01-181-5/+0
| | | | | | | It's never going to have texture fetches. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Fix out of bounds writes when uncompressing non-block-aligned ETC1.Eric Anholt2013-01-181-2/+2
| | | | | | Fixes a crash in GLB2.1 offscreen on the glthread branch. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add support for GL_ARB_texture_buffer_object_rgb32.Eric Anholt2013-01-181-0/+1
| | | | | | Tested with piglit ARB_texture_buffer_object/formats. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Add support for MESA_FORMAT_RGB_FLOAT32 surfaces.Eric Anholt2013-01-181-1/+1
| | | | | | | | | This is for GL_ARB_texture_buffer_object_rgb32 support, but it also causes the format to get used for float32 rgb textures as well on Ironlake and later. Since that came with some surprises, separate the change from the enable commit. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Make intel_region's pitch be bytes instead of pixels.Eric Anholt2013-01-1821-77/+67
| | | | | | | | | | | | We almost never want a stride in pixels -- if you're doing anything with a stride, you're specifying an offset or incrementing a pointer, and in both cases you had to multiply by cpp to get the bytes value you wanted. But worse, on the way to creating a region from a new tiled BO, we divided by cpp to get pitch in pixels, and for an RGB32 buffer (an upcoming change) the pitch wouldn't divide exactly, and we'd end up with a wrong stride in our region. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: Make intel_blit.c take pitches in bytes.Eric Anholt2013-01-188-19/+15
| | | | | | As we gain support for NPOT cpp, a pitch may not divide by cpp cleanly. Reviewed-by: Kenneth Graunke <[email protected]>
* r600g/llvm: tgsi to llvm emits store.swizzle intrinsic for vs/fs outputVincent Lejeune2013-01-183-58/+146
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g/llvm: tgsi to llvm emits stream output intrinsics.Vincent Lejeune2013-01-185-1/+39
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g/llvm:translate ARL opcode to a simple castVincent Lejeune2013-01-181-2/+12
| | | | Reviewed-by: Tom Stellard <[email protected]>
* r600g/llvm: rework handling of the constantsVadim Girlin2013-01-183-16/+54
| | | | | | | | | | | | Vincent Lejeune: - tgsi to llvm now emits pointers for constants Tom Stellard: - Only use texture cache for vtx fetch with compute shaders - Change address space used for constant loads to match LLVM backend. Reviewed-by: Tom Stellard <[email protected]>
* mesa: Only mark textures as mipmap incomplete on MAX_LEVEL issues.Kenneth Graunke2013-01-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the OpenGL 3.2 Core Profile specification, section 3.8.12: "For one-, two-, and three-dimensional and one-and two-dimensional array textures, a texture is mipmap complete if all of the following conditions hold true: - [...] - levelbase <= levelmax [...] Using the preceding definitions, a texture is complete unless any of the following conditions hold true: - [...] - The minification filter requires a mipmap (is neither NEAREST nor LINEAR), and the texture is not mipmap complete." (This text also appears in all GL >= 3.2 specs and the ES 3.0 spec.) From this, we see that levelbase <= levelmax should only affect mipmap completeness, not base-level completeness. Prior versions of GL did not have the notion of mipmap completeness, simply calling the texture incomplete in this case. But I don't think we really care. Fixes es3conform's sgis_texture_lod_basic_completeness test. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/vs: Store texturing results into a vec4 temporary.Kenneth Graunke2013-01-181-6/+7
| | | | | | | | | | | | | | | | The sampler appears to ignore writemasks (even when correcting the WRITEMASK_XYZW in brw_vec4_emit.cpp to the proper writemask) and just always writes all four values. To cope with this, just texture into a temporary, then MOV out into a register that has the proper number of components. NOTE: This is a candidate for stable branches. Fixes es3conform's shadow_execution_vert.test. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/vs: Set LOD to 0 for ordinary texture() calls.Kenneth Graunke2013-01-181-2/+5
| | | | | | | | | Previously it was left undefined, causing us to select a random LOD. NOTE: This is a candidate for stable branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965/vs: Create a 'lod_type' temporary for ir->lod_info.lod->type.Kenneth Graunke2013-01-181-5/+8
| | | | | | | | | | This is purely a refactor. However, in a moment, we'll want to set lod_type to float for ir_tex, where ir->lod_info.lod is NULL. NOTE: This is a candidate for stable branches (for the next patch). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* i965: Lower textureGrad() with samplerCubeShadow on pre-Haswell.Kenneth Graunke2013-01-181-6/+9
| | | | | | | | | | | | | | | | | Fixes regressions since commit 899017fc54c40c969b5239b33f3a17b311878b0d Author: Kenneth Graunke <[email protected]> Date: Fri Jan 4 07:53:09 2013 -0800 i965: Use Haswell's sample_d_c for textureGrad with shadow samplers. That patch assumed that all instances were lowered. However, we weren't lowering textureGrad() with samplerCubeShadow because I couldn't figure out the LOD calculations. It turns out they're easy: you just have to use 1 for the depth. This causes it to pass oglconform's four tests. Signed-off-by: Kenneth Graunke <[email protected]> Tested-by: Anuj Phogat <[email protected]> Tested-by: Ian Romanick <[email protected]>
* llvmpipe: turn on integer texture supportRoland Scheidegger2013-01-181-6/+16
| | | | | | | | | | Now that things mostly seem to work enable those formats. Some formats cause crashes (notably RGB8 variants) so switch these off (these crashes are not specific to INT/UINT variants but the state tracker doesn't use them for UNORM etc. formats so it went unnoticed so far). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: more fixes for integer color buffersRoland Scheidegger2013-01-181-3/+39
| | | | | | | | | | | | Cast back the fake floats to ints, and make sure we don't try to do scaling in format conversion (which only makes sense with normalized values). Also need to disable blending and alpha test (as per spec) for such buffers. This makes fbo-blending from the piglit ext_texture_integer tests work for most formats (some crash, and the luminance and intensity variants have the GB or GBA channels respectively wrong). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: trivial code and comment cleanup.Roland Scheidegger2013-01-181-14/+12
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* llvmpipe: fix using wrong format with MRT in blend codeRoland Scheidegger2013-01-184-11/+26
| | | | | | | | | | | | | We were passing in the rt index however this was always 0 for non-independent blend case. (The format was only actually used to decide if the color mask covered all channels so this went unnoticed and was discovered by accident.) Additionally, there was a second problem because we do fixups in the key based on color buffer format we cannot use non-independent blend anyway as the fixed up values would never get used. So always turn non-independent blending into independent. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mesa/es3: Don't check dimensions in _mesa_es3_error_check_format_and_typeIan Romanick2013-01-173-12/+3
| | | | | | | | | | Filtering of DEPTH_COMPONENT and DEPTH_STENCIL for TEXTURE_3D is already done in texture_error_check because these combinations aren't allowed on desktop GL either. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* mesa: Don't allow DEPTH_STENCIL for 3D texturesIan Romanick2013-01-171-1/+2
| | | | | | | | Just like DEPTH_COMPONENT. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* swrast: fix assorted bugs in software blit codeBrian Paul2013-01-171-10/+20
| | | | | | | | | | | | | | | | | 1. The loop over dest buffers in blit_linear() needed a null pointer check. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=59499 2. The code to grab the drawRb's format needs to be inside the drawing loop. 3. An equality test was using = instead of == thus messing up a renderbuffer attachment texture pointer. This lead to memory corruption and a crash at exit. Finally, fix a capitalization error NumDrawBuffers -> numDrawBuffers and change type to unsigned to fix signed/unsigned comparison warnings. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* radeonsi: Actually keep track if we are using depth textures for samplers.Michel Dänzer2013-01-171-3/+7
| | | | | | | 20-odd more piglits. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Fix Z24 texture formats.Michel Dänzer2013-01-171-2/+2
| | | | | | | About half a dozen more piglits. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Set SPI_SHADER_COL_FORMAT to what the pixel shader actually exports.Michel Dänzer2013-01-175-7/+14
| | | | | | | | | Instead of deriving it from the colour buffer formats only. Fixes a number of piglit tests which export depth from the pixel shader. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Use proper hardware format for stencil texturing.Michel Dänzer2013-01-171-1/+2
| | | | | | | Fixes piglit 'spec/ARB_depth_buffer_float/fbo-clear-formats stencil' crash. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Enable tiling for depth/stencil resources.Michel Dänzer2013-01-171-4/+3
| | | | | | | | | | | Enabling it for all resources still seems to cause problems, but depth/stencil buffers are always accessed with tiling by the DB block. Also, stick to 1D tiling for now. Getting 2D tiling to work properly will require substantial changes in libdrm_radeon and possibly the kernel as well. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* radeonsi: Consolidate calculation of tile mode index.Michel Dänzer2013-01-171-111/+71
| | | | | | | | Apart from the obvious cleanup, this makes sure all blocks use the same tiling mode for accessing the resource. Reviewed-by: Christian König <[email protected]> Signed-off-by: Michel Dänzer <[email protected]>
* nvc0: add support for accelerated video decoding through the dedicated enginesMaarten Lankhorst2013-01-176-3/+1833
| | | | | | Currently the use of external firmware is required, with kernel and userspace firmware needed for all Fermi cards except nvd9. Kepler and nvd9 should only require kernel firmware.
* radeonsi: Pass texture type to sampling intrinsics.Michel Dänzer2013-01-171-4/+2
| | | | Signed-off-by: Michel Dänzer <[email protected]>
* nvc0: add space checks to clear functionsMaarten Lankhorst2013-01-171-5/+14
| | | | Thanks to calim for helping me find and fix the issue.
* nv50: add space checks to clear functions, and respect depthMaarten Lankhorst2013-01-171-13/+24
| | | | Thanks to calim for helping me find and fix the issue.
* st/mesa: a couple fixes for st_BlitFramebuffer()Brian Paul2013-01-161-30/+52
| | | | | | | | | | | | 1. Loop over multiple destination color buffers. If we set glDrawBuffers(GL_FRONT_AND_BACK) we need to loop over multiple color buffers, blitting to each. 2. Add checks for null src/dst surface pointers. This fixes a crash in the piglit fbo-missing-attachment-blit test. See bug http://bugs.freedesktop.org/show_bug.cgi?id=59450 Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: simplify some src/dst surface setup in BlitFramebufferBrian Paul2013-01-161-4/+4
| | | | | | Use the renderbuffer attachment pointers that we grabbed earlier. Reviewed-by: Reviewed-by: Marek Olšák <[email protected]>
* meta: add 'f' suffix to floats to silence some MSVC warningsBrian Paul2013-01-161-1/+1
|
* mesa: add missing ASSERT_OUTSIDE_BEGIN_END() in _mesa_GetInternalformativ()Brian Paul2013-01-161-0/+3
| | | | Reviewed-by: Ian Romanick <[email protected]>
* Fix mapi code generator for out-of-tree buildJon TURNEY2013-01-161-1/+1
| | | | | | | | | | | | Use os.path.join() rather than hand-rolling it, so path is correct if sys.argv[0] returns an absolute path. (According to the python documentation, it's platform dependent whether sys.argv[0] is a full pathname or not. It probably also depends on how the process was started...) Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nvc0: Add support for video bufferMaarten Lankhorst2013-01-167-11/+310
|
* vl/video_buffer: fix up surface ordering for the interlaced caseMaarten Lankhorst2013-01-161-6/+6
| | | | | | | | It seems the other code expects surface[0..1] to be the luma field in interlaced case. See for example vdpau/surface.c vlVdpVideoSurfaceClear and vlVdpVideoSurfacePutBitsYCbCr. Signed-off-by: Maarten Lankhorst <[email protected]>
* vl/compositor: fix weave shader bugsMaarten Lankhorst2013-01-161-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Writemask was XY instead of YZ (thanks to calim for spotting it). The pixel calculation resulted in the pixel always being off by one. If y was .5: y' = round(y) + 0.5 = 1.5 Fixing this also means the LRP function has to swap the pixels it, since it's now the other way around for top/bottom. WIth these fixes only chroma for top and bottom pixel rows are wrongly interpolated in my test program: --- nvidia +++ nouveau @@ -1,4 +1,4 @@ -YCbCr[0] = 00c080 +YCbCr[0] = 00b070 YCbCr[1] = 00b070 YCbCr[2] = 029050 YCbCr[3] = 207050 @@ -61,4 +61,4 @@ YCbCr[60] = 0c5070 YCbCr[61] = c05090 YCbCr[62] = 0e70b0 -YCbCr[63] = e080c0 +YCbCr[63] = e070b0 Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Christian König <[email protected]>
* mesa: add new formatquery.c file to SConscript file to fix buildBrian Paul2013-01-161-0/+1
|
* radeonsi/vdpau: remove nonsense state tracker depChristian König2013-01-161-1/+0
| | | | | | | Added with automake conversion, but makes no sense at all. Signed-off-by: Christian König <[email protected]> Reviewed-by: Andreas Boll <[email protected]>
* glapi: Remove duplicate ARB_base_instance from gl_API.xmlIan Romanick2013-01-151-2/+0
| | | | Signed-off-by: Ian Romanick <[email protected]>
* intel: Enable GL_ARB_internalformat_queryIan Romanick2013-01-152-0/+24
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Add driver method to determine the possible sample countsIan Romanick2013-01-153-4/+44
| | | | | | | | | | | | | | Use this method in _mesa_GetInternalformativ for both GL_SAMPLES and GL_NUM_SAMPLE_COUNTS. v2: internalFormat may not be color renderable by the driver, so zero can be returned as a sample count. Require that drivers supporting the extension provide a QuerySamplesForFormat function. The later was suggested by Eric Anholt. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* mesa: Add dispatch and extension XML for GL_ARB_internalformat_queryIan Romanick2013-01-154-4/+30
| | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>