summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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-177-4/+1834
| | | | | | 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]>
* build: Make src/gtest before src/mesaMatt Turner2013-01-161-2/+1
| | | | | Fixes a make check problem where libgtest.la wasn't build before tests that want to link with it.
* 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]>
* mesa: Add extension tracking bit for GL_ARB_internalformat_queryIan Romanick2013-01-152-0/+2
| | | | | | | | | | | | Though, I'm tempted to always expose this extension when GL_ARB_framebuffer_object is exposed. In that case, it would share the same enable bit. v2: Correctly sort extension names. 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 skeleton implementation of glGetInternalformativIan Romanick2013-01-153-0/+160
| | | | | | | | | | This is for the GL_ARB_internalformat_query extension and GLES 3.0. v2: Generate GL_INVALID_OPERATION if the extension is not supported. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* meta: Move loop variable declaration outside for loop.Vinson Lee2013-01-151-1/+2
| | | | | | Fixes build with MSVC. Signed-off-by: Vinson Lee <[email protected]>
* mesa: move declarations before code to fix MSVC buildBrian Paul2013-01-151-4/+8
|
* mesa: Round float param in glTexparameterf() to nearest integerAnuj Phogat2013-01-151-9/+4
| | | | | | | | | | | | | | | | | | OpenGL 4.2 specification suggests rounding the float data to nearest integer when the type of internal state is integer. Out of range floats should be clamped to {INT_MIN, INT_MAX}. This is not specified anywhere in gl/gles spec but below test expects this behavior. This patch makes gles3 conformance sgis_texture_lod_basic_getter.test pass. A GL spec bug will be raised to include clamping of out of range floats. V2: Round float to nearest integer for all cases where _mesa_Texparameterf() converts float param to int. Use the same block of float to int conversion code for GL_TEXTURE_SWIZZLE_{R,G,B,A}_EXT cases as well. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add support to allow blitting to multiple color draw buffersAnuj Phogat2013-01-151-261/+300
| | | | | | | | | | | | | | | | | | | | | This patch fixes a blitting case when drawAttachment->Texture == readAttachment->Texture. It was causing an assertion failure in intel_miptree_attach_map() with gles3 conformance test case: framebuffer_blit_functionality_minifying_blit Number of changes in this file look scary. But most of them are caused by introducing a big for loop to support rendering to multiple color draw buffers. V2: Fixed a case when number of draw buffer attachments are zero. V3: Put a for loop in blit_nearest() and blit_linear() functions in to support blitting to multiple color draw buffers. V4: Remove variable declaration in for loop to avoid MSVC compilation issues. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: Add error checking in _mesa_BlitFramebuffer() for MRTsAnuj Phogat2013-01-151-47/+62
| | | | | | | | | | | | | | | | | | This patch adds required error checking in _mesa_BlitFramebuffer() when blitting to multiple color render targets. It also fixes a case when blitting to a framebuffer with renderbuffer/texture attached to GL_COLOR_ATTACHMENT{i} (where i!=0). Earlier it skips color blitting if nothing is found attached to GL_COLOR_ATTACHMENT0. V2: Fixed a case when number of draw buffer attachments are zero. V3: Do compatible_color_datatypes() and compatible_resolve_formats() check for all the draw renderbuffers in fbobject.c. Fix debug code at bottom of _mesa_BlitFramebuffer() to handle MRTs. Combine error checking code for linear blits with other color blit error checking. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>