summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* anv/meta: Use blitter API for copies between Images and BuffersNanley Chery2016-03-031-208/+6
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/meta: Add function which copies between Buffers and ImagesNanley Chery2016-03-031-0/+92
| | | | | | | v2: Keep pitch in units of bytes (Jason) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/meta: Add function to create anv_meta_blit2d_surf from anv_imageNanley Chery2016-03-031-0/+13
| | | | | | | v2: Keep pitch in units of bytes (Jason) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/meta: Implement the blitter API functionsNanley Chery2016-03-032-3/+145
| | | | | | | | | | | | | | | | | Most of the code in anv_meta_blit2d() is borrowed from do_buffer_copy(). Create an image and image view for each rectangle. Note: For tiled RGB images, ISL will align the image's row_pitch up to the nearest tile width. v2 (Jason): Keep pitch in units of bytes Make src_format and dst_format variables s/dest/dst/ in every usage v3: Fix dst_image width Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/meta: Modify blitter API fieldsNanley Chery2016-03-031-18/+5
| | | | | | | | | | Some fields are unnecessary. The variables "pitch" and "bs" are used for consistency with ISL. v2: Keep pitch in units of bytes (Jason) Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/meta: Add the beginnings of a blitter APIJason Ekstrand2016-03-031-0/+48
| | | | | | | | | | This API is designed to be an abstraction that sits between the VkCmdCopy commands and the hardware. The idea is that it is simple enough that it *should* be implementable using the blitter but with enough extra data that we can implement it with the 3-D pipeline efficiently. One design objective is to allow the user to supply enough information that we can handle most blit operations with a single draw call even if they require copying multiple rectangles.
* anv/meta: Remove redundancies in do_buffer_copy()Nanley Chery2016-03-031-28/+18
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/meta: Replace copy_format w/ block size in do_buffer_copy()Nanley Chery2016-03-031-11/+6
| | | | | | | | This is a preparatory commit that will simplify the future usage of this function. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/meta: Add missing command to exit meta in anv_CmdUpdateBuffer()Nanley Chery2016-03-031-0/+2
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/image: Create a linear image when requestedNanley Chery2016-03-031-1/+1
| | | | | | | | If a linear image is requested, the only possible result should be a linearly-tiled surface. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: Don't filter tiling flags if a specific tiling bit is setNanley Chery2016-03-031-5/+8
| | | | | | | | If a specific bit is set, the intention to create a surface with a specific tiling format should be respected. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* isl: Add function to get intratile offsets from x/y offsetsNanley Chery2016-03-032-12/+43
| | | | | Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/util: Fix vector resizingJason Ekstrand2016-03-031-12/+19
| | | | | It wasn't properly handling the fact that wrap-around in the source may not translate to wrap-around in the destination. This really needs unit tests.
* anv/gen7: Use predicated rendering for indirect computeJordan Justen2016-03-021-0/+45
| | | | | | | | | | For OpenGL, see commit 9a939ebb47a0d37a6b29e3dbb1b20bdc9538a721. Fixes: * dEQP-VK.compute.indirect_dispatch.upload_buffer.empty_command * dEQP-VK.compute.indirect_dispatch.gen_in_compute.empty_command Signed-off-by: Jordan Justen <[email protected]>
* anv: Save batch to local variable for indirect computeJordan Justen2016-03-021-5/+6
| | | | Signed-off-by: Jordan Justen <[email protected]>
* anv: Fix make checkJason Ekstrand2016-03-022-7/+10
|
* isl: Fix make checkJason Ekstrand2016-03-021-0/+1
|
* gen8/cmd_buffer: Properly return flushed push constant stagesJason Ekstrand2016-03-021-1/+3
| | | | | This is required on SKL so that we can properly re-emit binding table pointers commands.
* anv/meta_blit: Use unorm formats for 8 and 16-bit RGB and RGBA valuesJason Ekstrand2016-03-011-7/+16
| | | | | | While Broadwell is very good about UINT formats, HSW is more restrictive. Neither R8G8B8_UINT nor R16G16B16_UINT really exist on HSW. It should be safe to just use the unorm formats.
* Merge remote-tracking branch 'origin/master' into vulkanKenneth Graunke2016-03-01140-1896/+1468
|\
| * mesa: Remove NV_fragment_program remnants from dlist.c.Matt Turner2016-03-011-14/+7
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * mesa: Remove NV_fragment_program_option enable bit.Matt Turner2016-03-012-2/+0
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove NV_fragment_program opcode parsing.Matt Turner2016-03-012-9/+0
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove NV_fragment_program scalar suffix parsing.Matt Turner2016-03-011-17/+0
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove NV_fragment_program_option parsing support.Matt Turner2016-03-011-44/+5
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove NV_fragment_program Abs support.Matt Turner2016-03-0110-80/+4
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove incorrect comment about OPCODE_TXD.Matt Turner2016-03-011-1/+1
| | | | | | | | | | | | | | | | The table in prog_instruction.h is correct. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove OPCODE_TXP_NV.Matt Turner2016-03-015-30/+0
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Clean up after previous commit.Matt Turner2016-03-011-43/+41
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove condition-code and precision support.Matt Turner2016-03-0115-544/+62
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove OPCODE_KIL_NV.Matt Turner2016-03-018-54/+6
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Remove RelAddr2 support.Matt Turner2016-03-015-41/+3
| | | | | | | | | | | | | | | | Looks like more never-used crap from the first geometry shader attempt. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * program: Mark table const.Matt Turner2016-03-011-1/+1
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * mesa: Remove EmitCondCodes.Matt Turner2016-03-015-53/+2
| | | | | | | | | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * docs: Remove descriptions of long dead Emit* fields.Matt Turner2016-03-011-17/+0
| | | | | | | | | | | | | | | | Dead since commit d8a366200 in 2010. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Brian Paul <[email protected]>
| * glsl: Initialize gl_shader_program::EmptyUniformLocations.Matt Turner2016-03-012-1/+2
| | | | | | | | | | | | | | | | | | Commit 65dfb30 added exec_list EmptyUniformLocations, but only initialized the list if ARB_explicit_uniform_location was enabled, leading to crashes if the extension was not available. Cc: "11.2" <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
| * i965/meta: Don't pollute the framebuffer namespaceIan Romanick2016-03-013-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/meta: Use _mesa_bind_framebuffers instead of _mesa_BindFramebufferIan Romanick2016-03-013-8/+25
| | | | | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta: Don't pollute the framebuffer namespaceIan Romanick2016-03-014-54/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated names: you can use any name you want for a particular object type until you call the Gen function for that object type. Here's the problem scenario: - Application calls a meta function that generates a name. The first Gen will probably return 1. - Application decides to use the same name for an object of the same type without calling Gen. Many demo programs use names 1, 2, 3, etc. without calling Gen. - Application calls the meta function again, and the meta function replaces the data. The application's data is lost, and the app fails. Have fun debugging that. Fixes piglit tests: - object-namespace-pollution glGetTexImage-compressed framebuffer - object-namespace-pollution glGenerateMipmap framebuffer Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta/decompress: Track framebuffer using gl_framebuffer instead of GL API ↵Ian Romanick2016-03-012-7/+12
| | | | | | | | | | | | | | object handle Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta/generate_mipmap: Track framebuffer using gl_framebuffer instead of GL ↵Ian Romanick2016-03-012-24/+16
| | | | | | | | | | | | | | API object handle Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta: Use _mesa_bind_framebuffers instead of _mesa_BindFramebufferIan Romanick2016-03-013-8/+40
| | | | | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta: Use _mesa_CreateFramebuffers instead of _mesa_GenFramebuffersIan Romanick2016-03-014-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This enables later patches that will stop calling _mesa_GenFramebuffers or _mesa_CreateFramebuffers which pollute the framebuffer namespace. For framebuffers, the Bind call is still necessary. sed -i -e 's/_mesa_GenFramebuffers/_mesa_CreateFramebuffers/' \ src/mesa/drivers/common/*.c Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * i965/meta: Use _mesa_CreateFramebuffers instead of _mesa_GenFramebuffersIan Romanick2016-03-013-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This enables later patches that will stop calling _mesa_GenFramebuffers or _mesa_CreateFramebuffers which pollute the framebuffer namespace. For framebuffers, the Bind call is still necessary. sed -i -e 's/_mesa_GenFramebuffers/_mesa_CreateFramebuffers/' \ src/mesa/drivers/dri/i965/*.c Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta: Save and restore the framebuffer using gl_framebuffer instead of GL ↵Ian Romanick2016-03-012-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API object handle Some meta operations can be called recursively. Future changes (the "Don't pollute the ... namespace" changes) will cause objects with invalid names to be used. If a nested meta operation tries to restore an object named 0xDEADBEEF, it will fail. This also fixes another latent bug in meta. In a multithreaded, multicontext application, one thread can delete an object that is bound in another thread. That object continues to exist until it is unbound (i.e., its refcount drops to zero). Meta unbinds objects all over the place. As a result, the rebind in _mesa_meta_end could fail because the object vanished! See https://bugs.freedesktop.org/show_bug.cgi?id=92363#c8. Using _mesa_reference_<object type> to save and restore the objects prevents the refcount from going to zero. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363 Reviewed-by: Topi Pohjolainen <[email protected]>
| * mesa: Refactor bind_framebuffer to make _mesa_bind_framebuffersIan Romanick2016-03-012-12/+26
| | | | | | | | | | | | | | | | | | | | Fixing dd_function_table::BindFramebuffer will come later because that change is probably not suitable for stable. v2: Fix whitespace issue noticed by Topi. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta: Use _mesa_check_framebuffer_status instead of _mesa_CheckFramebufferStatusIan Romanick2016-03-014-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | sed -i -e 's/_mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER/_mesa_check_framebuffer_status(ctx, ctx->DrawBuffer/' \ -e 's/_mesa_CheckFramebufferStatus(GL_FRAMEBUFFER[^)]*/_mesa_check_framebuffer_status(ctx, ctx->DrawBuffer/' \ -e 's/_mesa_CheckFramebufferStatus(GL_READ_FRAMEBUFFER/_mesa_check_framebuffer_status(ctx, ctx->ReadBuffer/' \ $(grep -rl _mesa_CheckFramebufferStatus src/mesa/drivers) The second expression catches both GL_FRAMEBUFFER and GL_FRAMEBUFFER_EXT. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta: Obvious refactor of _mesa_meta_framebuffer_texture_imageIan Romanick2016-03-011-21/+5
| | | | | | | | | | Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * meta: Convert _mesa_meta_bind_fbo_image to take a gl_framebuffer instead of ↵Ian Romanick2016-03-015-49/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a GL API handle Also change the name of the function to _mesa_meta_framebuffer_texture_image. The function is basically a wrapper around _mesa_framebuffer_texture (which is used to implement glFramebufferTexture1D and friends), so it makes sense for it's name to be similar to that. The next patch will clean _mesa_meta_framebuffer_texture_image up considerably. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
| * virgl: add support for passing render condition flags to host.Dave Airlie2016-03-012-1/+5
| | | | | | | | | | | | | | | | This just passes the extra blit info to fix the render condition tests. Cc: "11.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>