summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* r600g: Add ar_chan member to struct r600_bytecodeTom Stellard2013-01-283-0/+4
| | | | | | | | r600_bytecode::ar_chan stores the register channel for the value that will be loaded into the AR register. At the moment, this field is only used by the LLVM backend. The default backend always sets ar_chan = 0.
* r600g: More robust checks for MOVA_INT instructionsTom Stellard2013-01-281-8/+35
|
* r600g/llvm: Add dummy export for vs outputVincent Lejeune2013-01-281-2/+20
| | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59588 Reviewed-by: Tom Stellard <[email protected]>
* r600g: Fix building with --enable-r600-llvm-compilerTom Stellard2013-01-282-7/+4
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=59877
* r600g: don't emit WAIT_UNTIL on cayman/TN (v2)Alex Deucher2013-01-281-9/+28
| | | | | | | | | | | | | It shouldn't be needed and older kernels don't support it. v2: Replace with PS partial flush as before. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59945 Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: add async for staging buffer upload v2Jerome Glisse2013-01-2812-17/+595
| | | | | | v2: Add virtual address to dma src/dst offset for cayman Signed-off-by: Jerome Glisse <[email protected]>
* r600g: add multi ring support with dma as first second ring v4Jerome Glisse2013-01-2814-176/+327
| | | | | | | | | | | | | | | | | | | | | | | | | | | We keep track of ring emission order in a stack, whenever we need to flush we empty the stack in a fifo order. There is few helpers function for bo mapping and other ring activities that will make sure that the ring stack is properly flush and submitted. v2: fix st flush path, and other flush path to properly flush all rings if necessary v3: - improve name of ring helpers - make sure that each time a cs is gona be written it endup at top of the stack to avoid any issue such as : STACK[0] = dma (withbo A,B) STACK[1] = gfx (withbo C,D) Now if code try to emit a dma command relative to bo C or D it will start writting cmd stream into the cs and once it reach the point where it adds relocation it will flush. At that point the cs will have cmd that don't have proper relocation into the relocation buffer and kernel will just refuse to run. v4: - Drop the stack idea as it turn out there is no way to use it or benefit from it. Any time the driver start command on other ring, it always need to flush the previous ring. So make code simpler by not using a stack. Signed-off-by: Jerome Glisse <[email protected]>
* radeon/winsys: add dma ring support to winsys v3Jerome Glisse2013-01-289-82/+218
| | | | | | | | | | | | | | | | | | | | Add ring support, you can create a cs for each ring. DMA ring is bit special regarding relocation as you must emit as much relocation as there is use of the buffer. v2: - Improved comment on relocation changes - Use a single thread to queue cs submittion this simplify driver code while not impacting performances. Rational for this is that you have to wait for all previous submission to have completed so there was never a case while we could have 2 different thread submitting a command stream at the same time. This code just consolidate submission into one single thread per winsys. v3: - Do not use semaphore for empty queue signaling, instead use cond var. This is because it's tricky to maintain an even number of call to semaphore wait and semaphore signal (the number of cs in the stack would for instance make that number vary). Signed-off-by: Jerome Glisse <[email protected]>
* gallivm,draw,llvmpipe: mass rename of unit->texture_unit/sampler_unitRoland Scheidegger2013-01-287-95/+95
| | | | | | | | | | | Make it obvious what "unit" this is (no change in functionality). draw still uses "unit" in places where it changes the shader by adding texture sampling itself - it seems like this can't work with shaders using dx10-style sample opcodes (can't mix gl-style and dx10-style sample instructions in a shader). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: split sampler and texture stateRoland Scheidegger2013-01-2820-357/+709
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the sampler interface to use separate sampler and texture (sampler_view) state. This is needed to support dx10-style sampling instructions. This is not quite complete since both draw/llvmpipe don't really track textures/samplers independently yet, as well as the gallivm code not quite using the right sampler or texture index respectively (but it should work for the sampling codes used by opengl). We are however losing some optimizations in the process, apply_max_lod will no longer work, and we potentially could end up with more (unnecessary) recompiles (if switching textures with/without mipmaps only so it shouldn't be too bad). v2: don't use different callback structs for sampler/sampler view functions (which just complicates things), fix up sampling code to actually use the right texture or sampler index, and similar for llvmpipe/draw actually distinguish between samplers and sampler views. v3: fix more of PIPE_MAX_SAMPLER / PIPE_MAX_SHADER_SAMPLER_VIEWS mismatches (both in draw and llvmpipe), based on feedback from José get rid of unneeded static sampler derived state.(which also fixes the only 2 piglit regressions due to a forgotten assignment), fix comments based on Brian's feedback. v4: remove some accidental unrelated whitespace changes Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/u_upload_mgr: fix a serious memory leakMarek Olšák2013-01-281-2/+1
| | | | It can eat all memory and crash in a matter of minutes with r600g.
* nouveau: don't try to use push_data if it's not implementedChristoph Bumiller2013-01-271-0/+3
|
* gles3: Update gl3.hMatt Turner2013-01-261-2/+2
| | | | | | Contains a fix for Khronos bug 9557. Reviewed-by: Jordan Justen <[email protected]>
* r600g: add more cases for copying unsupported formats to resource_copy_regionMarek Olšák2013-01-261-0/+12
| | | | just in case a new format is added to gallium
* r600g: don't use radeon_surface_level::npix_x/y/zMarek Olšák2013-01-264-32/+27
| | | | | | | npix_x/y/z is wrong with NPOT textures, since it's always aligned to POT if the level is non-zero, so we can't use that. This fixes piglit/spec/EXT_texture_shared_exponent/fbo-generatemipmap-formats.
* r600g: fix compile warnings in r600_cp_dma_copy_buffer on 32-bit gccMarek Olšák2013-01-262-4/+4
|
* r600g: fix up CP DMA for VM on cayman and TNAlex Deucher2013-01-252-6/+9
| | | | | | | Need to add the virtual address. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
* svga: use pipe_sampler_view_release() in svga_cleanup_tss_binding()Brian Paul2013-01-251-1/+1
| | | | | | | | | | | | | | Fixes a crash when the Redway3D Turbine demo exits. We've made this change in other places in the past. The root issue is texture objects are being shared by multiple contexts and sampler views get shared too. Sampler views have a context pointer and if that context gets deleted we may try to reference that context when finally deleting the sampler view. pipe_sampler_view_release() avoids this problem because it takes an explicit context. Reviewed-by: Zack Rusin <[email protected]>
* st/mesa: handle new GLSL IR enumerants in switch statementsBrian Paul2013-01-251-2/+16
| | | | To silence warnings about unhandled cases.
* svga: add NULL pointer check in svga_create_sampler_state()Brian Paul2013-01-251-0/+3
| | | | Note: This is a candidate for the 9.0 branch.
* vbo: add a null pointer check to handle OOM instead of crashingBrian Paul2013-01-251-0/+5
| | | | Note: This is a candidate for the 9.0 branch.
* util: add new error checking code in vbuf helperBrian Paul2013-01-251-27/+49
| | | | | | | | | | | Check the return value of calls to u_upload_alloc() and u_upload_data() and return early if needed. Since we don't have a way to propagate errors all the way up to Mesa through pipe_context::draw_vbo(), call debug_warn_once() so the user might have some clue about OOM errors. Note: This is a candidate for the 9.0 branch.
* st/mesa: do proper error checking for u_upload_alloc() callsBrian Paul2013-01-255-17/+26
| | | | | | | | | We weren't properly checking the return value of these calls (and calls to u_upload_data()) to detect OOM errors. Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* util: add some defensive coding in u_upload_alloc()Brian Paul2013-01-251-1/+7
| | | | | | | | | | | | | | Some callers of this function were checking the 'ptr' result to see if the function failed. But the correct way is to check the regular return value for PIPE_ERROR_x. Now we initialize all the returned values at the top of the function in case we do hit an error (like OOM). Callers are more likely to detect OOM conditions now. But there are some callers which don't do any error checking... Note: This is a candidate for the 9.0 branch. Reviewed-by: Jose Fonseca <[email protected]>
* glsl: use glsl_strtof() instead of glsl_strtod()Brian Paul2013-01-252-8/+8
| | | | | | Since the result of those calls is always assigned to a float. Reviewed-by: Ian Romanick <[email protected]>
* glsl: add new glsl_strtof() functionBrian Paul2013-01-252-0/+25
| | | | | | | Note, we could alternately implement this in terms of glsl_strtod() with a (float) cast. Reviewed-by: Ian Romanick <[email protected]>
* softpipe: add casts to silence MSVC warningsBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC signed/unsigned comparison warningsBrian Paul2013-01-251-4/+4
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC double->float conversion warningsBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* util: silence MSVC signed/unsigned warnings in debug_get_flags_option()Brian Paul2013-01-251-1/+1
| | | | Reviewed-by: José Fonseca <[email protected]>
* st/mesa: silence assorted MSVC warnings in DrawPixels codeBrian Paul2013-01-251-2/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* swrast: silence a bunch of MSVC warningsBrian Paul2013-01-251-19/+19
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: use GLbitfield64 when copying program inputsBrian Paul2013-01-251-2/+2
| | | | | | Note: This is a candidate for the 9.0 branch. Reviewed-by: José Fonseca <[email protected]>
* mesa: add some casts to silence MSVC warningsBrian Paul2013-01-251-14/+14
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: add casts in _mesa_GetTexParameterfv() to silence warningsBrian Paul2013-01-251-4/+4
| | | | | | There are other similar int->float casts elsewhere in the function. Reviewed-by: José Fonseca <[email protected]>
* i965: Enable ARB_shading_language_packingMatt Turner2013-01-251-0/+1
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965: Assert that the 4x8 pack/unpack operations have been loweredMatt Turner2013-01-253-0/+12
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* i965: Lower the 4x8 pack/unpack operationsMatt Turner2013-01-251-1/+5
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Add support for lowering 4x8 pack/unpack operationsMatt Turner2013-01-252-0/+285
| | | | | | | Lower them to arithmetic and bit manipulation expressions. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Evaluate constant pack/unpack 4x8 expressionsMatt Turner2013-01-251-0/+166
| | | | | | | | | That is, evaluate constant expressions for the following functions: packSnorm4x8, unpackSnorm4x8 packUnorm4x8, unpackUnorm4x8 Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Extend ir_expression_operation for ARB_shading_language_packingMatt Turner2013-01-254-0/+31
| | | | | | | | | For each function {pack,unpack}{Snorm,Unorm}4x8, add a corresponding opcode to enum ir_expression_operation. Validate the new opcodes in ir_validate.cpp. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Add IR lisp for ARB_shading_language_packingMatt Turner2013-01-255-0/+38
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Add infrastructure for ARB_shading_language_packingMatt Turner2013-01-257-0/+10
| | | | | Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* configure.ac: Don't set LLVM_LIBS when llvm is disabledTom Stellard2013-01-251-16/+19
|
* r600g: Don't build llvm_wrapper.cpp when we aren't using LLVMTom Stellard2013-01-251-1/+3
| | | | | | | | | | | | | | | | | | We were using the NEED_RADEON_GALLIUM conditional to decide whether or not to build llvm_wrapper.cpp, which is required for using the LLVM backend. llvm_wrapper.cpp needs to be linked against the LLVM IPO libary and this library is only added to LLVM_LIBS if either opencl or the r600-llvm-compiler is enabled. The NEED_RADEON_GALLIUM conditional is set to true when enabling the radeonsi driver, so if the radeonsi and r600 drivers are enabled without also enabling opencl or r600-llvm-compiler, llvm_wrapper.cpp will be built, but the IPO library won't be added to LLVM_LIBS. This was causing unresolved symbol errors when buiding with this configuration. https://bugs.freedesktop.org/show_bug.cgi?id=59831 Tested-by: Alex Deucher <[email protected]>
* i965: Pass in the glarray to get_surface_type.Eric Anholt2013-01-251-29/+22
| | | | | | | Dereffing all the values in the two callers was just pointless, and the function isn't inlined so there was actual code impact. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove nonsense comment.Eric Anholt2013-01-251-2/+0
| | | | | | vb.inputs_read has never been a thing, even in the initial import. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Remove NDEBUG undef that was snuck in.Eric Anholt2013-01-251-2/+0
| | | | | | If you want debug, set --enable-debug in your config flags. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: reuse _mesa_sizeof_type for index buffer types.Eric Anholt2013-01-251-24/+2
| | | | | | | The core Mesa code has just one more case than this (GL_BITMAP), so I don't see any cause to special-case it. Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Reuse precalculated ib_type_size value.Eric Anholt2013-01-251-1/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>