summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* r600: fix loop overrun in cayman_mul_double_instrDave Airlie2015-09-041-1/+1
| | | | | | Coverity warned about this. Ilia pointed it out. Signed-off-by: Dave Airlie <[email protected]>
* i965/gen9: Annotate input coverage mask changeBen Widawsky2015-09-032-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | As far as I can tell, the behavior is preserved from the previous generations. Before we set a single bit to tell the FS whether or not we'll be using an input coverage mask. Now we have some options which are implementing various extensions. These bits are used for the various conservative rasterization mechanisms (for collision detection, binning, and whatever else). I believe that the behavior is preserved because the problem which conservative rasterization is attempting to fix would go away with the "NORMAL" mode (at the cost of performance, I believe). This patch serves as documentation of the change by creating the enums, as well as giving some of the history with the links here so that the next person who comes along and looks at it doesn't spend as long as I had to in order to determine if there is an issue or not. Previously, this algorithm had been done in software, and this can still be used as long as we don't export an extension stating otherwise. References: https://www.opengl.org/registry/specs/NV/conservative_raster.txt References: https://http.developer.nvidia.com/GPUGems2/gpugems2_chapter42.html Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* svga: update call to u_upload_alloc()Brian Paul2015-09-031-3/+3
| | | | | | u_upload_alloc() no longer returns a return value. Trivial.
* winsys/radeon: remove exported buffers from the cacheMarek Olšák2015-09-031-0/+3
| | | | | Cc: 11.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* winsys/amdgpu: remove exported buffers from the cacheMarek Olšák2015-09-031-0/+3
| | | | | Cc: 11.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium/pb_bufmgr_cache: add a way to remove buffers from the cache explicitlyMarek Olšák2015-09-032-6/+41
| | | | | | | | This must be done before exporting a buffer as dmabuf fds, because we lose track of who is using it and can't trust the reference counter. Cc: 11.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* u_upload_mgr: remove the return value from u_upload_dataMarek Olšák2015-09-034-25/+22
| | | | Reviewed-by: Brian Paul <[email protected]>
* u_upload_mgr: remove the return value from u_upload_bufferMarek Olšák2015-09-032-31/+18
| | | | Reviewed-by: Brian Paul <[email protected]>
* u_upload_mgr: remove the return value from u_upload_alloc_bufferMarek Olšák2015-09-031-11/+9
| | | | Reviewed-by: Brian Paul <[email protected]>
* u_upload_mgr: remove the return value from u_upload_allocMarek Olšák2015-09-037-44/+48
| | | | | | The return buffer or the returned pointer can be used instead. Reviewed-by: Brian Paul <[email protected]>
* u_upload_mgr: optimize u_upload_allocMarek Olšák2015-09-031-15/+17
| | | | | | | This is probably the most called util function. It does almost nothing, yet it can consume 10% of the CPU on the profile. This drops it down to 5%. Reviewed-by: Brian Paul <[email protected]>
* gallium/radeon: remove 'dirty' member from r600_atomGrazvydas Ignotas2015-09-034-6/+1
| | | | | | It's no longer used by both r600 and radeonsi now. Signed-off-by: Marek Olšák <[email protected]>
* r600g: simplify dirty atom trackingGrazvydas Ignotas2015-09-033-49/+14
| | | | | | | Now that R600_NUM_ATOMS is below 64, dirty atom tracking can be simplified. Signed-off-by: Marek Olšák <[email protected]>
* r600g: start numbering atoms from 1Grazvydas Ignotas2015-09-033-3/+3
| | | | | | | There doesn't seem any reason to start from 4. Start from 1 instead (0 is left reserved to catch uninitialized atoms). Signed-off-by: Marek Olšák <[email protected]>
* r600g: make all viewport states use single atomGrazvydas Ignotas2015-09-036-34/+38
| | | | | | | Similarly to scissor states, we can use single atom to track all viewport states. This will allow to simplify dirty atom handling later. Signed-off-by: Marek Olšák <[email protected]>
* r600g: apply disable workaround on all scissorsGrazvydas Ignotas2015-09-032-9/+14
| | | | | | | | During review of the "r600g: make all scissor states use single atom" patch Marek Olšák noticed that scissor disable workaround should be applied on all scissor states and not just first one, so let's do so. Signed-off-by: Marek Olšák <[email protected]>
* r600g: make all scissor states use single atomGrazvydas Ignotas2015-09-036-40/+62
| | | | | | | As suggested by Marek Olšák, we can use single atom to track all scissor states. This will allow to simplify dirty atom handling later. Signed-off-by: Marek Olšák <[email protected]>
* mesa/pbo: Handle zero width, height or depth when validating accessNeil Roberts2015-09-031-0/+6
| | | | | | | | | | | | | | | It's legal to call glTexSubImage with zero values for the width, height or depth. Previously this was breaking the PBO access validation because it tries to work out the last pixel accessed by getting the pixel at height-1 and depth-1 which would end up with bogus values. This was causing GL errors to be generated during the Piglit texsubimage test, although the test was passing anyway. v2: Also check for width == 0. Don't validate the start pointer if any of the dimensions are zero. Reviewed-by: Ilia Mirkin <[email protected]>
* glsl: Remove unused total_attribs_size variable.Kenneth Graunke2015-09-031-1/+0
| | | | | | Accidentally left behind by my previous patch. Signed-off-by: Kenneth Graunke <[email protected]>
* glsl: Handle attribute aliasing in attribute storage limit check.Kenneth Graunke2015-09-021-28/+36
| | | | | | | | | | | | | | | | | | | | | | | | | In various versions of OpenGL and GLSL, it's possible to declare multiple VS input variables with aliasing attribute locations. So, when computing the storage requirements for vertex attributes, we can't simply add up the sizes. Instead, we need to look at the enabled slots. This patch begins tracking which attributes are double types that are larger than 128-bits (i.e. take up two vec4 slots). We then count normal attributes once, and count the double-size attributes a second time. Fixes deQP functional.attribute_location.bind_aliasing.max_cond_* tests on i965, which regressed with commit ad208d975a6d3aebe14f7c2c16039ee20. No Piglit changes on llvmpipe (which actually supports dvecs). Cc: "10.6 11.0" <[email protected]> Tested-by: Mark Janes <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]>
* i965/meta: Fix typo in commentIan Romanick2015-09-021-1/+1
| | | | | | Trivial. Signed-off-by: Ian Romanick <[email protected]>
* mesa: Don't allow wrong type setters for matrix uniformsIan Romanick2015-09-021-0/+25
| | | | | | | | | | | | | Previously we would allow glUniformMatrix4fv on a dmat4 and glUniformMatrix4dv on a mat4. Both are illegal. That later also overwrites the storage for the mat4 and causes bad things to happen. Should fix the (new) arb_gpu_shader_fp64-wrong-type-setter piglit test. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Cc: Dave Airlie <[email protected]> Cc: "10.6 11.0" <[email protected]>
* mesa: Pass the type to _mesa_uniform_matrix as a glsl_base_typeIan Romanick2015-09-023-42/+42
| | | | | | | | | | | | This matches _mesa_uniform, and it enables the bug fix in the next patch. v2: s/type/basicType/ in the assert in _mesa_uniform_matrix. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> [v1] Cc: Dave Airlie <[email protected]> Cc: "10.6 11.0" <[email protected]>
* mesa: Silence unused parameter warnings in bufferobj.cIan Romanick2015-09-021-0/+2
| | | | | | | | | | | | | | main/bufferobj.c: In function 'count_buffer_size': main/bufferobj.c:520:26: warning: unused parameter 'key' [-Wunused-parameter] count_buffer_size(GLuint key, void *data, void *userData) ^ main/bufferobj.c: In function 'flush_mapped_buffer_range_fallback': main/bufferobj.c:740:56: warning: unused parameter 'index' [-Wunused-parameter] gl_map_buffer_index index) ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Remove target parameter from _mesa_handle_bind_buffer_genIan Romanick2015-09-023-7/+4
| | | | | | | | | | main/bufferobj.c: In function '_mesa_handle_bind_buffer_gen': main/bufferobj.c:915:37: warning: unused parameter 'target' [-Wunused-parameter] GLenum target, ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* i965: Make gen7_enable_hw_binding_tables staticIan Romanick2015-09-022-2/+1
| | | | | | | | All of the other state upload functions are static because the only use is in the brw_tracked_state structure. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Abdiel Janulgue <[email protected]>
* i965: Make gen8_upload_state_base_address staticIan Romanick2015-09-022-5/+2
| | | | | | | | All of the other state upload functions are static because the only use is in the brw_tracked_state structure. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
* linker: Silence GCC unused parameter warningsIan Romanick2015-09-021-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | linker.cpp:320:55: warning: unused parameter 'ir' [-Wunused-parameter] virtual ir_visitor_status visit_leave(ir_function *ir) ^ linker.cpp:327:53: warning: unused parameter 'ir' [-Wunused-parameter] virtual ir_visitor_status visit_leave(ir_return *ir) ^ linker.cpp:333:49: warning: unused parameter 'ir' [-Wunused-parameter] virtual ir_visitor_status visit_enter(ir_if *ir) ^ linker.cpp:339:49: warning: unused parameter 'ir' [-Wunused-parameter] virtual ir_visitor_status visit_leave(ir_if *ir) ^ linker.cpp:345:51: warning: unused parameter 'ir' [-Wunused-parameter] virtual ir_visitor_status visit_enter(ir_loop *ir) ^ linker.cpp:351:51: warning: unused parameter 'ir' [-Wunused-parameter] virtual ir_visitor_status visit_leave(ir_loop *ir) ^ linker.cpp:2824:53: warning: unused parameter 'ctx' [-Wunused-parameter] link_calculate_subroutine_compat(struct gl_context *ctx, struct gl_shader_program *prog) ^ linker.cpp:2854:47: warning: unused parameter 'ctx' [-Wunused-parameter] check_subroutine_resources(struct gl_context *ctx, struct gl_shader_program *prog) ^ linker.cpp:3368:49: warning: unused parameter 'ctx' [-Wunused-parameter] link_assign_subroutine_types(struct gl_context *ctx, ^ Also make link_assign_subroutine_types static since it is only called from this file. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* mesa: Fix warning about static being in the wrong placeIan Romanick2015-09-025-6/+6
| | | | | | | | | | | | | | | | | | | | Because the compiler already has enough things to complain about. grep -rl 'const static' src/ | while read f do sed --in-place -e 's/const static/static const/g' $f done brw_eu_emit.c: In function 'brw_reg_type_to_hw_type': brw_eu_emit.c:98:7: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] const static int imm_hw_types[] = { ^ brw_eu_emit.c:120:7: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] const static int hw_types[] = { ^ Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* i965/cs: Setup push constant data for uniformsJordan Justen2015-09-025-5/+138
| | | | | | | | | | brw_upload_cs_push_constants was based on gen6_upload_push_constants. v2: * Add FINISHME comments about more efficient ways to push uniforms Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* meta: Save/restore compute shadersJordan Justen2015-09-021-2/+4
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* svga: fix referencing a NULL framebuffer cbufCharmaine Lee2015-09-021-2/+2
| | | | | | | | | Check for a valid framebuffer cbuf pointer before accessing its associated surface. Fix piglit test fbo-drawbuffers-none. Reviewed-by: Brian Paul <[email protected]>
* svga: increment texture age when surface is to be marked as dirtyCharmaine Lee2015-09-021-7/+6
| | | | | | | | | | | | | | | | Commit b9ba8492 removes an unneeded pipe_surface_release() from st_render_texture(). This implies a surface can now be reused for a render buffer. Currently, when we render to a texture, we mark the surface as dirty. But in svga_mark_surface_dirty(), if the surface is already marked as dirty, it does not increment the texture age. Any view to this texture might not be updated properly then. With this patch, the texture age is incremented regardless of whether the surface is already marked as dirty or not. Fix bug 1499181. Reviewed-by: Sinclair Yeh <[email protected]>
* svga: fix backed surface view regressionCharmaine Lee2015-09-024-17/+46
| | | | | | | | | | | | | | | | | | Commit b9ba8492 removes an unneeded pipe_surface_release() from st_render_texture() and exposes a bug in the backed surface view creation. Currently a backed surface view for a conflicted surface view is created at framebuffer emit time. But if shader sampler views are changed but framebuffer surface views remain unchanged, emit_framebuffer() will not be called and conflicted surface views will not be detected. To fix this, also check for conflicted surface views when setting sampler views. If there is any conflicted surface views, enable the framebuffer dirty bit so that the framebuffer emit code has a chance to create a backed surface view for the conflicted surface view. Fix cinebench-r11-test regression. Reviewed-by: Brian Paul <[email protected]>
* i965/fs: Handle MRF destinations in lower_integer_multiplication().Matt Turner2015-09-021-4/+4
| | | | | | | | | | | | | | | | The lowered code reads from the destination, which isn't possible from message registers. Fixes the following dEQP tests on SNB: dEQP-GLES3.functional.shaders.precision.int.highp_mul_fragment dEQP-GLES3.functional.shaders.precision.int.mediump_mul_fragment dEQP-GLES3.functional.shaders.precision.int.lowp_mul_fragment Cc: "10.6 11.0" <[email protected]> Tested-by: Mark Janes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* docs: document VMware OpenGL 3.3 supportBrian Paul2015-09-021-0/+35
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: update driver for version 10 GPU interfaceBrian Paul2015-09-0264-2369/+8655
| | | | | | | | | | | | | | | | | This is a squash commit of roughly two years of development work. Authors include: Brian Paul Charmaine Lee Thomas Hellstrom Jakob Bornecrantz Sinclair Yeh Mingcheng Chen Kai Ninomiya MengLin Wu The driver supports OpenGL 3.3. Signed-off-by: Brian Paul <[email protected]>
* svga: add new version 10 device command prototypesBrian Paul2015-09-021-0/+333
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_streamout.h fileBrian Paul2015-09-021-0/+50
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_state_tgsi_transform.c fileBrian Paul2015-09-021-0/+293
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_state_sampler.c fileBrian Paul2015-09-021-0/+339
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_state_gs.c fileBrian Paul2015-09-021-0/+264
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_pipe_streamout.c fileBrian Paul2015-09-021-0/+320
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_pipe_gs.c fileBrian Paul2015-09-021-0/+142
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_link.[ch] filesBrian Paul2015-09-022-0/+140
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_cmd_vgpu10.c fileBrian Paul2015-09-021-0/+1289
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: add new svga_tgsi_vgpu10.c fileBrian Paul2015-09-021-0/+6778
| | | | Signed-off-by: Brian Paul <[email protected]>
* svga: remove unused SVGA3D_* command functionsBrian Paul2015-09-022-156/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* gallium/st: add pipe_context::get_timestamp()Brian Paul2015-09-022-2/+18
| | | | | | | | | The VMware svga driver doesn't directly support pipe_screen::get_timestamp() but we can do a work-around. However, we need a gallium context to do so. This patch adds a new pipe_context::get_timestamp() function that will only be called if the pipe_screen::get_timestamp() function is NULL. Signed-off-by: Brian Paul <[email protected]>
* svga/winsys: Add support for VGPU10Brian Paul2015-09-0222-134/+473
| | | | | | | This involves a few driver modifications to keep things building. The driver may not actually run properly at this point. Signed-off-by: Brian Paul <[email protected]>