summaryrefslogtreecommitdiffstats
path: root/src/intel
Commit message (Collapse)AuthorAgeFilesLines
* isl: Use bpb in a few places where it's more natural than bsJason Ekstrand2016-07-134-6/+6
| | | | Reviewed-by: Chad Versace <[email protected]>
* isl: Use bpb for determining YUV image paddingJason Ekstrand2016-07-131-1/+1
| | | | | | | When we initially dropped bpb in favor of bs, we accidentally didn't change this one line properly. This brings it back to what it should be. Reviewed-by: Chad Versace <[email protected]>
* isl: Bring back isl_format_layout::bpbJason Ekstrand2016-07-132-2/+4
| | | | | | | | A while ago we got rid of the bits-per-block because we thought we didn't need it. We're about to introduce some very useful 1 and 2-bit formats so we really should be able to handle them again. Reviewed-by: Chad Versace <[email protected]>
* isl: Change the physical size of a W-tile to 128x32Jason Ekstrand2016-07-134-19/+15
| | | | Reviewed-by: Chad Versace <[email protected]>
* isl: Rework the way we define tile sizes.Jason Ekstrand2016-07-132-81/+137
| | | | | | | | | | | This is based on a very long set of discussions between Chad and myself about how we should properly represent HiZ and CCS buffers. The end result of that discussion was that a tiling actually has two different sizes, a logical size in elements, and a physical size in bytes and rows. This commit reworks ISL's pitch and size calculations to work in terms of these two sizes. Reviewed-by: Chad Versace <[email protected]>
* isl: Rework the way we handle surface paddingJason Ekstrand2016-07-131-27/+25
| | | | Reviewed-by: Chad Versace <[email protected]>
* isl: Use ARRAY_PITCH_SPAN_FULL for depth/stencil surfaces on gen7Jason Ekstrand2016-07-131-1/+1
| | | | | | | We helpfully inserted a PRM quotation about how we need to use ARRAY_PITCH_SPAN_FULL and then set it to COMPACT. Oops... Reviewed-by: Chad Versace <[email protected]>
* isl: Stop multiplying height by block sizeJason Ekstrand2016-07-131-2/+2
| | | | | | | | The row pitch already specifies the size of a row of elements. Multiplying by the block height simply causes us to allocate as muc as 12 times more memory than needed for compressed textures. Reviewed-by: Chad Versace <[email protected]>
* isl: Get rid of tiling_get_extentJason Ekstrand2016-07-132-17/+0
| | | | | | It was unused Reviewed-by: Chad Versace <[email protected]>
* anv/pipeline: Assert that the number of uniforms from NIR fitsJason Ekstrand2016-07-131-0/+1
|
* anv/dump: Fix post-blit memory barrierChad Versace2016-07-091-2/+2
| | | | | | Swap srcAccessMask and dstAccessMask. Reviewed-by: Jason Ekstrand <[email protected]>
* anv/dump: Fix vkCmdPipelineBarrier flagsChad Versace2016-07-091-1/+1
| | | | | | 'true' is not valid for VkDependencyFlags. Reviewed-by: Jason Ekstrand <[email protected]>
* anv/dump: Add support for dumping framebuffersJason Ekstrand2016-07-093-0/+158
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/dump: Add a barrier for the source imageJason Ekstrand2016-07-091-0/+22
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/dump: Refactor the guts into helpersJason Ekstrand2016-07-091-85/+139
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/dump: Use anv_minify instead of hand-rolling itJason Ekstrand2016-07-091-5/+4
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv/dump: Take an aspect in dump_image_to_ppmJason Ekstrand2016-07-092-3/+10
| | | | Reviewed-by: Chad Versace <[email protected]>
* anv: gitignore anv_timestamp.hChad Versace2016-07-061-0/+1
|
* anv: vulkan: remove the anv_device.$(OBJEXT) ruleEmil Velikov2016-07-062-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Atm the actual rule will expand to foo.o which is used for static libraries only. Thus the automake manual recommendation [to use OBJEXT] won't help us, since since we're working with a shared library. Thus let's 'demote' the file and add it back to BUILT_SOURCES. This will manage all the complexity for us, at the (existing expense) of working only with the all, check and install targets. The crazy (why the issue was hard to spot): If the dependencies (.deps/*.Plo) are already created one can alter the anv_device.$(OBJEXT) line and/or nuke it all together. That won't lead to any warnings/issues, even though the Makefile is regenerated. Moral of the story: Always rm -rf top_builddir or don't resolve the dependencies manually and use BUILT_SOURCES. Cc: "12.0" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96825 Fixes: d7a604c3f7a ("anv: use cache uuid based on the build timestamp.") Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Tested-by: Mark Janes <[email protected]>
* anv: automake: indent with tabs and not spacesEmil Velikov2016-07-051-4/+4
| | | | Signed-off-by: Emil Velikov <[email protected]>
* anv: use cache uuid based on the build timestamp.Emil Velikov2016-07-052-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not rely on the git sha1: - its current truncated form makes it less unique - it does not attribute for local (Vulkand or otherwise) changes Use a timestamp produced at the time of build. It's perfectly unique, unless someone explicitly thinkers with their system clock. Even then chances of producing the exact same one are very small, if not zero. v2: Remove .tmp rule. Its not needed since we want for the header to be regenerated on each time we call make (Eric). v3: - Honour SOURCE_DATE_EPOCH, to make the build reproducible (Michel) - Replace the generated header with a define, to prevent needless builds on consecutive `make' and/or `make install' calls. (Dave) v4: - Keep the timestamp generation at make time. (Jason) v5: - Ensure that file is regenerated on incremental builds. Cc: Michel Dänzer <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* anv/wsi: create swapchain images using specified image usageLionel Landwerlin2016-07-042-4/+9
| | | | | | | | | | | | | | | The image usage specified by the caller of vkCreateSwapchainKHR should be passed onto the internal image creation. Otherwise the driver might later crash when the user tries to use the image as a combined sampler even though the creation was explicitly created with VK_IMAGE_USAGE_TRANSFER_SRC_BIT. Leaving the previous VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT as this might be expected even if the swapchain is created without any flag. Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96791 Cc: "12.0" <[email protected]>
* Android: add missing u_math.h include path for libmesa_islRob Herring2016-06-281-0/+2
| | | | | | | | | | | | | | | Commit 87d062a94080 ("i965: Fix shared local memory size for Gen9+.") added u_math.h include which broke the Android build: In file included from external/mesa3d/src/intel/isl/isl_storage_image.c:25: In file included from external/mesa3d/src/mesa/drivers/dri/i965/brw_compiler.h:29: external/mesa3d/src/mesa/main/macros.h:35:10: fatal error: 'util/u_math.h' file not found ^ Add the missing include paths for libmesa_isl. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Kenneth Garunke <[email protected]>
* anv: Add anv_render_pass_attachment::store_opChad Versace2016-06-232-2/+2
| | | | | | | | | | Will be needed for resolving auxiliary surfaces. I didn't add anv_render_pass_attachment::stencil_store_op, as the driver would likely never use it, as stencil surfaces never have auxiliary surfaces. Reviewed-by: Jason Ekstrand <[email protected]>
* anv: Use different BOs for different scratch sizes and stagesJason Ekstrand2016-06-227-55/+32
| | | | | | | | | This solves a race condition where we can end up having different stages stomp on each other because they're all trying to scratch in the same BO but they have different views of its layout. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* genxml: Make ScratchSpaceBasePointer an address instead of an offsetJason Ekstrand2016-06-228-38/+59
| | | | | | | | While we're here, we also fixup MEDIA_VFE_STATE and rename the field in 3DSTATE_VS on gen6-7.5 to be consistent with the others. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* anv: Add an allocator for scratch buffersJason Ekstrand2016-06-222-0/+89
| | | | | Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
* genxml: Put append counter fields before MCS in RENDER_SURFACE_STATE on gen7Jason Ekstrand2016-06-222-4/+4
| | | | | | | | | | The pack header generation scripts can't handle the case where you have two addresses in the same dword; they just take whatever is the last one. This meant that the MCS address wasn't properly getting handled. Since we don't care about append counters, we can just re-arrange the XML for now. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* anv,isl: Lower storage image formats in anvJason Ekstrand2016-06-222-7/+4
| | | | | | | | | | ISL was being a bit too clever for its own good and lowering the format for us. This is all well and good *if* we always want to lower it. However, the GL driver selectively lowers the format depending on whether the surface is write-only or not. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Allow for full 31-bit buffer texture sizesJason Ekstrand2016-06-221-1/+1
| | | | | | | | Ivy Bridge and above can handle up to 2^31 elements for RAW buffer surfaces. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Don't use designated initializers for buffer surface stateJason Ekstrand2016-06-221-23/+23
| | | | | Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Add assertions for buffer surface restrictionsJason Ekstrand2016-06-221-0/+11
| | | | | Acked-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Don't set SurfacePitch for gen9 1-D texturesJason Ekstrand2016-06-221-0/+3
| | | | | | | | This field is ignored by the hardware in this case and, on very large 1-D textures, it can end up being larger than the maximum allowed value. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Use TILEWALK_XMAJOR for linear surfaces on gen7Jason Ekstrand2016-06-221-2/+2
| | | | | | | | | This matches better what happens on gen8 where the "Tiled Surface" and "Tile Walke" bits are combined into a single two-bit value. This is also more consistent with what the GL driver does. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Emit no-op mip tail setup on SKLJason Ekstrand2016-06-221-0/+8
| | | | | | | | This hasn't ever been a problem in the past but it is recommended by the hardware docs. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Only set cube face enables if usage includes CUBE_BITJason Ekstrand2016-06-221-7/+9
| | | | | | | | It seems safe to set it all the time, but this reduces the diff between the way i965 does it and what ISL does. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Use the layout for computing qpitch rather than dimensionsJason Ekstrand2016-06-221-19/+15
| | | | | | | | | | For depth/stencil 1-D textures on SKL, we want them layed out in the old format that has been used since gen4. In order for the surface state fill-out code to handle, this it needs to distinguish based on layout rather than just dimensionality. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Set the IntegerSurfaceFormat bit on HaswellJason Ekstrand2016-06-221-0/+4
| | | | | | | This fixes 688 Vulkan CTS tests on Haswell. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/format: Mark R9G9B9E5 as containing 9-bit unsigned float channelsJason Ekstrand2016-06-221-1/+1
| | | | | Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Don't set RenderTargetViewExtent for texture surfacesJason Ekstrand2016-06-221-4/+18
| | | | | | | | | | The docs specify that this only matters for render targets and surfaces used with typed dataport messages. On some platforms (gen4-6) the Depth field has more bits than RenderTargetViewExtent so we can have textures with more levels than we can render to. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Set SurfaceArray based on the surface dimensionJason Ekstrand2016-06-221-1/+1
| | | | | | | | | | According to the PRM, you can't set SurfaceArray for 3D or buffer textures. There doesn't seem to be a good reason not to set it when we can. On the other hand, if we don't set it we can end up getting strange results for 1-layer array textures such as textureSize() returning the wrong results. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Don't force-disable L2 bypass for everythingJason Ekstrand2016-06-221-5/+0
| | | | | | | | | We already set the bit in the few cases where it's required by the docs so there's no need to set it all the time. This has no noticable perf impact for Dota 2 on Vulkan with the time demo I have. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Refactor the setup of clear colorsJason Ekstrand2016-06-221-18/+22
| | | | | | | | This commit switches clear colors to use #if's instead of a C if. This lets us properly handle SNB where the clear color field doesn't exist. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Refactor the per-gen isl_to_gen_h/valign tablesJason Ekstrand2016-06-221-6/+8
| | | | | | | | | This moves the #if's around so that halign and valign have different sets of #if conditions. This also prepares us for SNB because isl_to_gen_halign is not defined at all on gen6. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Return an extent3d from the halign/valign helperJason Ekstrand2016-06-221-22/+11
| | | | | Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Put pitch calculations togetherJason Ekstrand2016-06-221-22/+20
| | | | | | | This is purely cosmetic, but it makes things look a bit more readable. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Put all dimension setup together and towards the topJason Ekstrand2016-06-221-80/+74
| | | | | | | This is purely cosmetic, but it makes things look a bit more readable. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Put surface format setup at the topJason Ekstrand2016-06-221-7/+7
| | | | | | | This is purely cosmetic, but it makes things look a bit more readable. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Remove some unused fieldsJason Ekstrand2016-06-221-9/+0
| | | | | | | | They're already zero-initialized and we have no plans of doing anything more interesting with them. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
* isl/state: Don't use designated initializers for the surface stateJason Ekstrand2016-06-221-47/+48
| | | | | | | | | While designated initializers are nice, they also force us to put some things in the initializer and some things later. Surface state setup is complicated enough that this really hurts readability in the long run. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>