Commit Graph

6802 Commits

Author SHA1 Message Date
baldurk b16dda9d4a Update to vulkan headers 1.1.129
* Expand handling for EXT_buffer_device_address to cover
  KHR_buffer_device_address
2019-11-27 16:14:40 +00:00
baldurk b924f84d8d Apply swizzle on resource parameter when doing loads. Closes #1619 2019-11-27 14:37:33 +00:00
baldurk 9f4fb3cd33 Don't lose forced SRGB texture remapping in D3D11/D3D12 2019-11-27 11:07:06 +00:00
baldurk 082521ec24 Fix texture remapping on GL for stencil textures 2019-11-27 11:05:43 +00:00
baldurk 11c39377b1 Handle range adaption in texture remapping
* This can be used in saving overlays, stencil, etc
2019-11-27 11:05:24 +00:00
baldurk 8e338de519 Fix clang compilation 2019-11-27 00:22:47 +00:00
baldurk 94ccfd5497 Don't set base/max level for rectangle textures 2019-11-26 17:38:27 +00:00
baldurk 04f349cbe8 Don't transition pArgumentBuffer unless we need to
* The buffer may be in an upload heap and be invalid to transition.
2019-11-26 17:38:27 +00:00
baldurk 9d34444b85 Ignore VK_SUBOPTIMAL_KHR return value from vkAcquireNextImageKHR 2019-11-26 17:38:27 +00:00
baldurk 7395456b7c Deliberately leak android tool cache so it doesn't go out of scope
* We need this to survive until shutdown, and global destruction order is
  undefined.
2019-11-26 17:38:27 +00:00
baldurk 938056a67c Add support for serialising MSAA initial states on GL 2019-11-26 17:38:27 +00:00
baldurk 62dc2c5a91 Check that format/texture is supported on local proxy
* Even if we can map a remote format precisely to a local API format, that
  doesn't mean the local API driver supports it - we need to check, otherwise
  force a remap.
2019-11-26 17:38:26 +00:00
baldurk a4372b2b5f Fix size calculations in vulkan GetTextureData 2019-11-26 17:38:26 +00:00
baldurk 3daf899cef Add internal marker for GetTextureData on Vulkan 2019-11-26 17:38:26 +00:00
baldurk ab74df54ca Use typecast provided at proxy texture creation time on D3D
* When we create proxy textures on D3D we create them as typeless, but this
  means we might lose the only time we are told about the type interpretation of
  the texture. If we then later get asked to view the texture as typeless, be
  sure to use that type info to interpret it, instead of defaulting to UNORM or
  FLOAT.
2019-11-26 17:38:26 +00:00
baldurk edc8fb6bd6 Be more precise with texture remapping to handle integer textures 2019-11-26 17:38:26 +00:00
baldurk 45144ed478 Don't rely on proxy renderer for texture description in image viewer 2019-11-26 17:38:26 +00:00
baldurk f6d7e2c6e4 If a typed DXGI format isn't available, consider texture unsupported 2019-11-26 17:38:26 +00:00
baldurk 19847c4574 GL doesn't support block-compressed 3D textures 2019-11-26 17:38:26 +00:00
baldurk ba8d16ea1c Add y-flipping for GL in image viewer
* Conventionally images have an origin at the top left, opposite to GL, so we
  want to flip the same as the replay proxy using GL as a proxy renderer for a
  non-GL API.
2019-11-26 17:38:26 +00:00
baldurk bcc34fab0a All types of D24S8 textures should be swizzled on GL, not just MSAA 2019-11-26 17:38:26 +00:00
baldurk 44b2247151 Support creating typeless proxy textures in GL. Closes #1516
* Since GL requires a concrete texture format, we create the textures as UINT
  format, and then cast to the right view on display once we know.
* The cast requires a copy - ARB_texture_view isn't always supported and even
  when they are they require immutable textures (ARB_texture_storage) which we
  don't want to require either.
2019-11-26 17:38:26 +00:00
baldurk db563bb0bf Refactor public interface around handling of textures
* Subresource handling is more consistent - we pass around a struct now that
  contains the array slice, mip level, and sample. We remove the concept of
  'MSAA textures count samples as extra slices within the real slices' and
  internalise that completely. This also means we have a consistent set
  everywhere that we need to refer to a subresource.
* Functions that used to be in the ReplayOutput and use a couple of implicit
  parameters from the texture viewer configuration are now in the
  ReplayController and take them explicitly. This includes GetMinMax,
  GetHistogram, and PickPixel.
* Since these functions aren't ReplayOutput relative, if you want to decode the
  custom shader texture or the overlay texture you need to pass that ID
  directly.
2019-11-26 17:38:25 +00:00
baldurk 01344c7e83 Rename typeHint to typeCast 2019-11-26 17:38:25 +00:00
baldurk e6627542cf Don't enumerate available GPUs when running in renderdoccmd 2019-11-26 17:38:25 +00:00
baldurk 9b4a1c900f Unbind pixel packing buffers when uploading texture data. Closes #1614 2019-11-26 10:39:59 +00:00
baldurk d9a18aae63 Unbind pixel packing buffers when creating textures. Refs #1614 2019-11-26 10:36:04 +00:00
baldurk d469498c95 Ignore proxy targets when calling GetActiveTexRecord() 2019-11-26 10:35:27 +00:00
baldurk b861598d97 Add case for DXGI_FORMAT_B8G8R8A8_TYPELESS 2019-11-26 00:41:15 +00:00
Rémi Palandri 9da79fc778 add support for serialising invalidate framebuffer calls in GL 2019-11-25 23:39:31 +00:00
baldurk 03d064beb0 Tighten up handling of unsupported DXGI formats in DDS read/write 2019-11-25 23:36:45 +00:00
baldurk 9be59bd02e Ensure all resource formats have somewhat sensible parameters
* This is needed even for 'special' resource formats, as they may need e.g. the
  component type correctly specified.
2019-11-25 23:36:45 +00:00
baldurk b72283e38d Use EXT_debug_utils for internal markers and support queue-level markers
# Conflicts:
#	renderdoc/driver/vulkan/vk_replay.cpp
2019-11-25 23:36:45 +00:00
baldurk d2aee67afe Make it a bit easier to self-host capture on vulkan
* You need to register rdocself.json by hand but otherwise then the same
  workflow works as for other APIs.
2019-11-25 23:36:45 +00:00
baldurk 3fb132e9ff Fix copy-paste error removing wrong extension on vulkan init 2019-11-25 23:36:45 +00:00
baldurk 966d71e096 Explicitly reject BGRA order versions of formats we don't support on D3D 2019-11-25 23:36:44 +00:00
baldurk 316adb0eab Fix BGRA/RGBA order names for packed formats 2019-11-25 23:36:44 +00:00
baldurk a4e152c999 Fix bit-packing output on vulkan 2019-11-25 23:36:44 +00:00
Benson Joeris 05b2afd164 Vulkan replay: omit zero size vkMapMemory calls.
The spec for `vkMapMemory` requires that `size` must be greater than 0.
However, `vkFlushMappedMemoryRanges` may include `VkMappedMemoryRange`s
with `size` equal to 0.

RenderDoc replays `vkFlushMappedMemoryRanges` by calling`vkMapMemory`,
copying the data, and then calling `vkUnmapMemory`. This can turn valid
`vkFlushMappedMemoryRanges` into invalid `vkMapMemory` calls.

This fix skips the `vkMapMemory` (and corresponding `vkUnmapMemory`
calls) for zero size ranges.

Change-Id: I08fd40f36f2c63e28f3df42bc799981b5eb35295
2019-11-25 23:36:32 +00:00
Steve Karolewics 9ff7b04f6f Move code to gather PSInput definitions to a separate function
The code to get initial values for PS debugging includes a step to
traverse the shader stage's inputs and previous stage's outputs, to
define a struct that is used in a replacement pixel shader to collect
the initial values. This logic is API-agnostic and can be moved to a
DXBC file to allow D3D12 to use it.
2019-11-25 09:54:08 +00:00
baldurk b222d6388c Don't flush bufinfo/resinfo opcodes
* The input miplevel is an integer even if the outputs are floats. The outputs
  won't be denormal as they're dimensions etc.
2019-11-22 15:08:16 +00:00
baldurk 9de4931213 Don't ever flush immediate values in shader debugging
* We assume that fxc won't output a denormalised float in the bytecode, and this
  prevents us from flushing integer inputs to otherwise flushable float-type
  operations
2019-11-22 14:59:18 +00:00
baldurk 99e13a72f2 Improve logging around frame capturers
* This can be useful for users of the in-application API to identify what frame
  capturers are available (in case they're passing the wrong handles)
2019-11-21 21:25:40 +00:00
baldurk 4243ab8fbe Fix stencil array copies in D3D12 CopyArrayToTex2DMS 2019-11-21 21:25:39 +00:00
baldurk 592d2edff1 When saving typeless textures to DDS, use typeCast to inform type used 2019-11-21 21:25:39 +00:00
baldurk 64c9b93e27 Make sure that the DSV flag is set when fetching MSAA texture data 2019-11-21 21:25:39 +00:00
baldurk 39b6f8eb02 Fix D3D MSAA<->Array conversion for D16, interpret as UNORM not as FLOAT 2019-11-21 17:09:01 +00:00
baldurk 4458ab3205 Remove assumptions that captures are always frames
* Previously we had "Frame X" and "Start of Frame" hardcoded in the event
  browser, and the end of frame was in many cases assumed to be a present call.
  However with the in-application API this is not necessarily true.
* Presents are now serialised separately in all APIs and displayed wherever they
  happen in the frame, and if there is no present at the end of the frame an
  "End of Capture" marker is inserted. Similarly API-defined captures are not
  given a potentially misleading frame number.
2019-11-21 17:09:01 +00:00
baldurk cb216441fe Ensure we prepare initial states for late-created programs. Closes #1606
* The initial states for GL programs contain a uniform mapping table, which is
  required for correct replay. We already do this in glLinkProgram we were just
  missing the call in glCreateShaderProgramv.
2019-11-21 17:09:00 +00:00
Benson Joeris 3b48de6b2d Vulkan: Don't split depth/stencil aspects when initializing images
For images with both depth and stencil aspects, `VkImageMemoryBarrier`s
must include both depth and stencil aspects--e.g. you cannot transition
the layout of the depth alone. This can be violated by the barriers in
RenderDoc replay that transition image layouts before and after
initialization. This change ensures that, if depth or stencil needs to
be initialized, then beth will be initialized, and the image layout
transition will be applied to the two aspects together.

Specifically, `ImgRefs` stores a separate FrameRefType for each aspect.
This can cause the depth and stencil aspects to have different reset
requirements, which can cause a barrier to contain only one of the
depth/stencil aspects.

Change-Id: I8a16a0c450bd8e6cb0d60c1d688b01b75df86915
2019-11-21 15:47:23 +00:00