summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ilo: switch to ilo states for VF stageChia-I Wu2013-06-077-53/+55
| | | | | | | | | | Define and use struct ilo_vb_state; struct ilo_ve_state; struct ilo_ib_state; in ilo_context.
* ilo: move hardware limits to ilo_gpe.hChia-I Wu2013-06-072-22/+56
|
* draw: trivial fix comment typoRoland Scheidegger2013-06-061-1/+1
|
* gallium/tgsi: add missing string for layer semanticRoland Scheidegger2013-06-063-1/+8
| | | | | | Also report if a shader writes the layer semantic Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: bump 3d and cube map limits to 2048 and 8192 respectivelyRoland Scheidegger2013-06-061-2/+2
| | | | | | | These should just work, required by d3d10. Too large resources will get thrown out separately anyway. Reviewed-by: Brian Paul <[email protected]>
* glsl: Fix uniform buffer object counting.Eric Anholt2013-06-063-4/+43
| | | | | | | | | | | | | | | | | | | | We were counting uniforms located in UBOs against the default uniform block limit, while not doing any counting against the specific combined limit. Note that I couldn't quite find justification for the way I did this, but I think it's the only sensible thing: The spec talks about components, so each "float" in a std140 block would count as 1 component and a "vec4" would count as 4, though they occupy the same amount of space. Since GPU limits on uniform buffer loads are surely going to be about the size of the blocks, I just counted them that way. Fixes link failures in piglit arb_uniform_buffer_object/maxuniformblocksize when ported to geometry shaders on Paul's GS branch, since in that case the max block size is bigger than the default uniform block component limit. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Make a local variable to avoid restating this array lookup.Eric Anholt2013-06-061-8/+8
| | | | | | v2: Convert another instance of the array lookup. (caught by Tapani) Reviewed-by: Ian Romanick <[email protected]>
* intel: Use the CHIPSET macro in the PCI ID tables for the device name.Kenneth Graunke2013-06-061-184/+4
| | | | | | | | | | | | | Putting the human readable device names directly in the PCI ID list consolidates things in one place. It also makes it easy to customize the name on a per-PCI ID basis without a huge code explosion. Based on a patch by Kristian Høgsberg. v2: Fix 830M/845G names and #undef CHIPSET (caught by Emit Velikov). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* radeon/winsys: correct RADEON_GEM_WAIT_IDLE useJonathan Gray2013-06-062-2/+2
| | | | | | | | | | | | RADEON_GEM_WAIT_IDLE is declared DRM_IOW but mesa uses it with drmCommandWriteRead instead of drmCommandWrite which leads to the ioctl being unmatched and returning an error on at least OpenBSD. Problem originally noticed in libdrm by Mark Kettenis. Dave Airlie pointed out that mesa has the same issue. Signed-off-by: Jonathan Gray <[email protected]>
* i965: Adding more reserved PCI IDs for Haswell.Rodrigo Vivi2013-06-052-3/+77
| | | | | | | | | | | At DDX commit Chris mentioned the tendency we have of finding out more PCI IDs only when users report. So Let's add all new reserved Haswell IDs. NOTE: This is a candidate for stable branches. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=63701 Signed-off-by: Rodrigo Vivi <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-05449-449/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* gallium: System z supportRichard Sandiford2013-06-052-2/+6
| | | | | | | | | The main change is to use MCJIT rather than the old JIT, which will never be supported for System z. The endianness part is by example since the patch was tested on a glibc system. Signed-off-by: Richard Sandiford <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* llvmpipe: improve alignment calculation for fetching/storing pixelsRoland Scheidegger2013-06-051-12/+21
| | | | | | | | | | | | | | | | This was always doing per-pixel alignment which isn't necessary, except for the buffer case (due to the per-element offset). The disabled code for calculating it was incorrect because it assumed that always the full block would be fetched, which may not be the case, so fix this up. The original code failed for instance for r10g10b10a2 the alignment would have been calculated as 4 (block_width) * 4 (bytes) so 16, but the actual fetch may have only fetched 2 values at a time, hence only alignment 8 - it is unclear what exactly would happen in this case (alignment larger than size to fetch). So just use the (already calculated) fetch size instead and get alignment from that which should always work, no matter if fetching 1,2 or 4 pixels. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: reduce alignment requirement for 1d resources from 4x4 to 4x1Roland Scheidegger2013-06-059-44/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For rendering to buffers, we cannot have any y alignment. So make sure that tile clear commands only clear up to the fb width/height, not more (do this for all resources actually as clearing more seems pointless for other resources too). For the jit fs function, skip execution of the lower half of the fragment shader for the 4x4 stamp completely, for depth/stencil only load/store the values from the first row (replace other row with undef). For the blend function, also only load half the values from fs output, replace the rest with undefs so that everything still operates on the full 4x4 block to keep code the same between 4x1 and 4x4 (except for load/store of course which also needs to skip (store) or replace these values with undefs (load))., at the cost of slightly less optimal code being produced in some cases. Also reduce 1d and 1d array alignment too, because they can be handled the same as buffers so don't need to waste memory. v2: don't try to run special blend code for 4x1, (very) slightly less complexity if we just use the same code as for 4x4 which may or may not make it easier to optimize in the future (as we care a lot more about 4x4 performance than 1d). v2: don't use undef values for unused fs src outputs with llvm 3.1 as it apparently can trigger a bug in llvm. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: cleanup of generate_unswizzled_blendRoland Scheidegger2013-06-051-22/+37
| | | | | | | | | | | | | Some parameters were used inconsistently, for instance not using block_width/block_height/block_size for deferring number of pixels but rather relying on guesses from the number of fragment shaders etc, so fix this up (no actual change in behavior since the block size stays fixed). (Though most of the code would work with different block_height, with three exceptions, one being the hacked r11g11b10 conversions and twiddle code which only work with block_height 2 not 1, and the last one being blend vector type not being 128bit wide.) Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: enhance special sse2 4x4f and 2x8f -> 1x16ub conversionRoland Scheidegger2013-06-052-32/+60
| | | | | | | | | | | | | There's no good reason why it can't handle 2x4f->1x8ub, 1x4f->1x4ub and 1x8f->1x8ub cases, there might be legitimate reasons why we don't have enough input vectors for a full destination vector, and using pack intrinsics should still be much better than using generic conversion (it looks like convert_alpha from the blend code might hit this though I suspect it could be avoided). v2: add another test vector format to lp_test_conv so this gets tested. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: (trivial) fix lp_build_concat_nRoland Scheidegger2013-06-051-1/+5
| | | | | | | The code was designed to handle no-op concat but failed (unless the caller was using same pointer for src and dst). Reviewed-by: Jose Fonseca <[email protected]>
* mesa: change MAX_PROGRAM_ADDRESS_REGS to 1, clamp to it in state trackerBrian Paul2013-06-042-2/+3
| | | | | | | | | | | | | We've never properly supported more than one address register. There isn't even a field in prog_src_register or prog_dst_register to indicate which address register to use if RelAddr!=0. In the state tracker, clamp MaxAddressRegs against MAX_PROGRAM_ADDRESS_REGS since many gallium drivers do support more. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65226 Reviewed-by: Jose Fonseca <[email protected]>
* intel: Don't try to blorp or blit CopyTexSubImage(1D_ARRAY).Paul Berry2013-06-042-0/+7
| | | | | | | | | | | | | | | | Blorp and the hardware blitter can't be used to implement CopyTexSubImage when the image type is 1D_ARRAY, because of a coordinate system mismatch (the Y coordinate in the source image is supposed to be matched up to the Z coordinate in the destination texture). The hardware blitter path (intel_copy_texsubimage) contained a perf debug warning for this case, but it failed to actually fall back. The blorp path didn't even check. Fixes piglit test "copyteximage 1D_ARRAY". Reviewed-by: Eric Anholt <[email protected]>
* i965/gen6+: Fix multisample assertions in CopyTexSubImage hw blitter path.Paul Berry2013-06-041-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 045612c (intel: Add an assert for glCopyTexSubImage() being called on MSAA buffers) added an assertion to intel_copy_texsubimage() to make sure that multisampling was not in use, based on the assumption that glCopyTexSubImage() can't legally be used with multisampling. However, there is one case where glCopyTexSubImage() can legally be used with multisampling: when the source buffer is a multisampled window system buffer. If the source and destination color formats don't match, the blorp path will fail, so intel_copy_texsubimage() will be called. In this case, we need intel_copy_texsubimage() to return false so that we fall back to meta to do the copy. (The multisampled source buffer won't cause a problem for the meta path, because it uses glReadPixels, which forces a multisample resolve). It's still safe to assert that the destination image is single-sampled, because it's not legal to call glCopyTexSubImage() on multisampled textures. Fixes some failures with piglit tests "copyteximage {1D,2D,CUBE,RECT,2D_ARRAY}" (with "samples=..." argument). Reviewed-by: Eric Anholt <[email protected]>
* mesa: Prevent possible out-of-bounds read by save_SamplerParameterfv.Vinson Lee2013-06-031-1/+4
| | | | | | | Fixes "Out-of-bounds access" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* i965: fix problem with constant out of bounds access (v3)Dave Airlie2013-06-043-1/+16
| | | | | | | | | | | | | | | | | | | | | | | Okay I now understand why Frank would want to run away, this is my attempt at fixing the CVE out of bounds access to constants outside the range. This attempt converts any illegal constants to constant 0 as per the GL spec, and is undefined behaviour. A future patch should add some debug for users to find this out, but this needs to be backported to stable branches. CVE-2013-1872 v2: drop the last hunk which was a separate fix (now in master). hopefully fix the indentations. v3: don't fail piglit, the whole 8/16 dispatch stuff was over my head, and I spent a while figuring it out, but this one is definitely safe, one piglit pass extra on my Ironlake. NOTE: This is a candidate for stable branches. Signed-off-by: Dave Airlie <[email protected]>
* intel: Fix copying of separate stencil data in glCopyTexSubImage().Eric Anholt2013-06-031-8/+15
| | | | | | | | | | | | | We were copying the source stencil data onto the destination depth data. Fixes piglit copyteximage other than 1D_ARRAY. v2: Fix unintentional dropping of the "don't double-copy for packed depth/stencil" check. While blorp is only supported on separate stencil hardware at the moment, hopefully that will change soon. Review by Jordan. Reviewed-by: Jordan Justen <[email protected]>
* meta: Fix temporary image type for float depth/stencil.Eric Anholt2013-06-031-4/+14
| | | | | | Fixes assertion failure in piglit copyteximage. Reviewed-by: Chad Versace <[email protected]>
* intel: Fix performance regression from miptree blit changes.Eric Anholt2013-06-032-3/+2
| | | | | | | | | | | | | | When making v2 of da2880bea05bfc87109477ab026a7f5401fc8f0c, I carefully checked all of the calls in that commit to see that I'd updated them, but forgot to update the new calls in the later commits such as .e845c5cf7abce55759501a473459aff3bf25c9ca. As a result, we were getting Y tiled temporaries even though the whole point of the temporary was to untile! The steady state of the intro scene of lightsmark goes from 13 to 17 fps. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65154 Reviewed-by: Chad Versace <[email protected]>
* glcpp: Add test case for recently fixed loop-control underflow bug.Carl Worth2013-06-032-0/+25
| | | | | | | To trigger the bug, it suffices to have a line-continuation followed by a newline and then a non-line-continuation backslash. Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp: Fix post-decrement underflow in loop-control variableCarl Worth2013-06-031-1/+3
| | | | | | | | | | | | | This loop-control condition with a post-decrement operator would lead to an underflow of collapsed_newlines. This in turn would cause a subsequent execution of the loop to labor inordinately trying to return the loop-control variable to a value of 0 again. Fix this by dis-intertwining the test and the decrement. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65112 Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Fix glColorPointer(GL_FIXED)Chad Versace2013-06-031-0/+8
| | | | | | | | | | | | | | | | | | | | | When a gl_client_array is created with glColorPointer, gl_client_array::Normalized is true. This caused the translation from the gl_client_array's type to a BRW_SURFACEFORMAT to assertion fail. Fixes the spinning cube's color in Android 4.2's ApiDemos.apk, "Graphics > OpenGL ES". Fixes assertion failure in mesa-demos/src/egl/opengles1/tri_x11 on Haswell and Ivybridge: brw_draw_upload.c:287: get_surface_type: Assertion `0' failed. No Piglit regressions on Haswell. Note: This is a candidate for the 9.1 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42182 Issue: AXIA-2954 Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* softpipe: draw_find_shader_output returns -1 on invalid outputsZack Rusin2013-05-301-1/+1
| | | | | | | | It was changed from 0 to allow shader outputs at 0 that are different from position. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* radeonsi/compute: Upload work group, work item size in input bufferTom Stellard2013-06-031-11/+27
|
* radeonsi/compute: Pass kernel arguments in a buffer v2Tom Stellard2013-06-033-35/+44
| | | | | v2: - Fix memory leak in si_set_constant_buffer()
* radeonsi/compute: Implement un-binding of global buffersTom Stellard2013-06-031-12/+19
|
* radeonsi/compute: Support multiple kernels in a compute programTom Stellard2013-06-031-9/+18
|
* radeonsi/compute: Add missing PIPE_COMPUTE capsTom Stellard2013-06-031-0/+16
|
* i965 gen7: use SURFACE_STATE fields to select render level/layerJordan Justen2013-06-022-18/+46
| | | | | | | | | | Rather than pointing the surface_state directly at a single sub-image of the texture for rendering, we now point the surface_state at the top level of the texture, and configure the surface_state as needed based on this. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa/texformat: add _mesa_tex_target_is_array functionJordan Justen2013-06-022-0/+16
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel: add layered parameter to update_renderbuffer_surfaceJordan Justen2013-06-023-1/+9
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel_fbo: set gl_renderbuffer Depth fieldJordan Justen2013-06-021-0/+2
| | | | | | | | | Set the renderbuffer's Depth field to match the texture's Depth when rendering to a texture. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* intel: print image depth in debug messageJordan Justen2013-06-021-2/+2
| | | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: handle missing read buffer in _mesa_get_color_read_format/type()Brian Paul2013-06-021-30/+48
| | | | | | | | | | | | We were crashing when GL_READ_BUFFER == GL_NONE. Check for NULL pointers and reorganize the code. The spec doesn't say which error to generate in this situation, but NVIDIA raises GL_INVALID_OPERATION. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65173 NOTE: This is a candidate for the stable branches. Tested-by: Vedran Rodic <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* meta: move vertex array enables for mipmap generationBrian Paul2013-06-021-2/+2
| | | | | | | | | | | | | | | | | | Before, on the second call to GenerateMipmap we were enabling two vertex arrays for the current vertex array object, rather than the private generate-mipmap vertex array object. This caused things to blow up elsewhere. This patch moves the array enables into the block where the generate-mipmap vertex array object is created, as we do in the setup_ff_generate_mipmap() function. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60518 NOTE: This is a candidate for the stable branches. Tested-by: [email protected] Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* mesa: fix hodge podge indentation, update comments in texformat.cBrian Paul2013-06-021-186/+184
|
* gallium: add support for layered renderingRoland Scheidegger2013-06-012-3/+22
| | | | | | | | | | Since pipe_surface already has all the necessary fields no interface changes are necessary except adding a new shader semantic value (TGSI_SEMANTIC_LAYER). (Note that what GL knows as "gl_Layer" variable d3d10 is naming "RENDER_TARGET_ARRAY_INDEX".) v2: drop cap bit (just tied to geometry shader), add docs.
* gallivm: fix out-of-bounds access with mirror_clamp_to_edge address modeRoland Scheidegger2013-06-011-6/+7
| | | | | | | | | | | | | | | | | | | Surprising this bug survived so long, we were missing a clamp (in the linear filtering version). (Valgrind complained a lot about invalid reads with piglit texwrap, I've also seen spurios failures in this test which might have happened due to this. Valgrind probably didn't complain before the alignment reduction in llvmpipe to 4x4 since the test is using tiny textures so the reads were still always well within allocated area.) While here, also do an effective clamp (after half subtraction) of [0,length-0.5] instead of [0, length-1] which saves an instruction (the filtering weight could be different due to this, but only if both texels point to the same max texel so it doesn't matter). (Both changes are borrowed from PIPE_TEX_CLAMP_TO_EDGE case.) Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: fix bogus assertions for buffer surfacesRoland Scheidegger2013-06-011-2/+2
| | | | | | | | | | One of the assertion made no sense for buffer rendertargets (due to the union), so drop it. (The same assertion is present already in the path for texture surfaces later.). v2: make assertion completely accurate (suggested by Jose). Reviewed-by: Jose Fonseca <[email protected]>
* i965: Fix haswell_upload_cut_index when there's no index buffer.Kenneth Graunke2013-05-311-1/+13
| | | | | | | | | | | | | brw->ib.type is reset to -1 at the start of each batch. If there's no index buffer, it won't get updated to a sensible value, resulting in _mesa_primitive_restart_index's "Invalid index buffer type" assertion tripping. Fixes a regression since 7c87a3b5dac118697a9b67caa7b6d5cab60f316d. NOTE: This is a candidate for the 9.1 branch (and should be squashed). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65195 Signed-off-by: Kenneth Graunke <[email protected]>
* llvmpipe: reduce alignment requirement for resources from 64x64 to 4x4Roland Scheidegger2013-05-317-53/+83
| | | | | | | | | | | | | | | | | | | | | | | | The overallocation was very bad especially for things like 1d array textures which got blown up by a factor of 64. (Even ordinary smallish 2d textures benefit a lot from this, a mipmapped 64x64 rgba8 texture previously used 7*16kB = 112kB instead of now ~22kB.) 4x4 is chosen because this is the size the jit functions run on, so making it smaller is going to be a bit more complicated. It is actually not strictly 4x4 pixel, since we'd want to avoid situations where different threads are rendering to the same cacheline so we keep cacheline size alignment in x direction (often 64bytes). To make this work introduce new task width/height parameters and make sure clears don't clear the whole tile if it's a partial tile. Likewise, the rasterizer may produce fragments outside the 4x4 blocks present in a tile, so don't call the jit function for them. This does not yet fix rendering to buffers (which cannot have any y alignment at all), and 1d/1d array textures are still overallocated by a factor of 4. v2: replace magic number 4 with LP_RASTER_BLOCK_SIZE, fix size of buffers allocated (needed in case we render to them). Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: Remove x/y from cmd_binAdam Jackson2013-05-316-47/+30
| | | | | | | | | | These were mostly just a waste of memory and cache pressure, and were really only used for debugging. This change reduces instruction count (as measured by callgrind's Ir event) of gnome-shell-perf-tool on Ivybridge by 3.5% ± 0.015% (n=20). Signed-off-by: Adam Jackson <[email protected]>
* r600g/sb: fix broken assertVadim Girlin2013-05-311-1/+1
| | | | Signed-off-by: Vadim Girlin <[email protected]>
* glapi: Add some missing static_dispatch="false" annotations to es_EXT.xmlAndreas Boll2013-05-311-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following build errors on powerpc: CC glapi_dispatch.lo In file included from glapi_dispatch.c:90:0: ../../../../../src/mapi/glapi/glapitemp.h:1640:1: error: no previous prototype for 'glReadBufferNV' [-Werror=missing-prototypes] ../../../../../src/mapi/glapi/glapitemp.h:4198:1: error: no previous prototype for 'glDrawBuffersNV' [-Werror=missing-prototypes] ../../../../../src/mapi/glapi/glapitemp.h:6377:1: error: no previous prototype for 'glFlushMappedBufferRangeEXT' [-Werror=missing-prototypes] ../../../../../src/mapi/glapi/glapitemp.h:6389:1: error: no previous prototype for 'glMapBufferRangeEXT' [-Werror=missing-prototypes] ../../../../../src/mapi/glapi/glapitemp.h:6401:1: error: no previous prototype for 'glBindVertexArrayOES' [-Werror=missing-prototypes] ../../../../../src/mapi/glapi/glapitemp.h:6413:1: error: no previous prototype for 'glDeleteVertexArraysOES' [-Werror=missing-prototypes] ../../../../../src/mapi/glapi/glapitemp.h:6433:1: error: no previous prototype for 'glGenVertexArraysOES' [-Werror=missing-prototypes] ../../../../../src/mapi/glapi/glapitemp.h:6445:1: error: no previous prototype for 'glIsVertexArrayOES' [-Werror=missing-prototypes] NOTE: This is a candidate for the 9.0 and 9.1 branches. Reviewed-by: Maarten Lankhorst <[email protected]> Reviewed-by: Brian Paul <[email protected]>