Commit Graph
7664 Commits
Author SHA1 Message Date
baldurk df575a17b4 Ensure all texture parameter set & get happens with active texture 0
* It's unclear exactly what happens when a different active texture is set, the
  spec seems to suggest that the active texture unit is ignored for most queries
  that aren't about texture-slot bindings but then it doesn't say explicitly
  whether that means glBindTexture() with a non-zero active slot will then bind
  the texture for querying or not.
* For safety and simplicity we always work on texture unit 0. On replay this is
  most simply accomplished by pushing and popping the active slot at the same
  time that we push and pop the binding for our EXT_direct_state_access
  emulation.
* For the couple of cases that happen during capture when we might not be
  emulating EXT_direct_state_access, we push and pop by hand.
2020-06-15 15:44:09 +01:00
baldurk 43eaca0266 Don't fetch mip/layer for renderbuffers
* Renderbuffers are a legacy concept that some programs still use, but they
  don't have array layers or mips
2020-06-15 15:44:09 +01:00
thisisjimmyfb 52967ad291 Eliminated MarkDirtyWithWriteReference
because it is interfering with the reference
tracking for skipping cleared or don't care
renderpasses
2020-06-15 15:43:52 +01:00
thisisjimmyfb 58a6d7eb76 skip initial states for cleared renderpass
also refactored the postpone logic
2020-06-15 15:43:52 +01:00
Lionel Landwerlin aa16eb0ed0 Allow KHR counters on pass boundary commands
We would like to be able to measure implicit resolves operations.
2020-06-15 10:28:21 +01:00
Lionel Landwerlin 70ef09eb52 Filter out non command scope KHR counters
KHR counters come in 3 different scopes (quoting the spec) :

  * VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR - the performance
    counter scope is a single complete command buffer.

  * VK_PERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR - the performance
    counter scope is zero or more complete render passes. The
    performance query containing the performance counter must begin
    and end outside a render pass instance.

  * VK_PERFORMANCE_COUNTER_SCOPE_COMMAND_KHR - the performance counter
    scope is zero or more commands.

The way we're currently using the counters is tied to draw/dispatch
commands so we should only use the SCOPE_COMMAND type of counters.
2020-06-15 10:28:21 +01:00
baldurk 70f838d358 Don't leak GetLastError for fully implemented functions. Closes #1942
* When we plan to return a function pointer even with no onward implementation,
  wglGetProcAddress will have set PROC_NOT_FOUND or some similar error. We'll
  still return our hook though so we need to unset that error code just in case
  the application is looking for it.
2020-06-12 13:40:02 +01:00
baldurk 6e899b894d Disable warning in tinyexr with latest VS2019 compiler 2020-06-11 22:38:38 +01:00
baldurk d1f4a47cd5 Add a load of MSBuild nonsense to *avoid* targeting a specific Win SDK
* Even though we don't care about the windows SDK version at all, we actively
  need to avoid the default which actively sabotages us.
2020-06-11 20:05:03 +01:00
Aliya Pazylbekova ff4a632fbf Vk pixel history: fix scissor test bug
For when scissor offset is negative
2020-06-08 22:10:47 +01:00
baldurk 138881f7aa Add more deny flags to OpenExistingHeapFromAddress heaps. Closes #1933 2020-06-08 19:42:00 +01:00
baldurk d0ff7a1f64 Fix mapping for arrays with float4 stride but partial last element
* The size won't quite be a multiple of the stride when the last element isn't a
  multiple of a float4
2020-06-08 16:48:43 +01:00
baldurk 969713dc15 Change rdcstr WriteAll overload to non-templated 2020-06-08 15:51:10 +01:00
baldurk a2079c7d7f Fix fetching of vertex buffer bindings that aren't compact or in order 2020-06-05 17:35:19 +01:00
baldurk f1e31bd710 Only upload columns that are valid from paramers in debugging
* Since e.g. the length operation calculates float4 length always we rely on
  smaller vectors having 0s for the other paramters
2020-06-05 16:29:52 +01:00
baldurk 2801e54714 Skip pixel shader debugging if no shader is bound 2020-06-05 16:02:06 +01:00
baldurk 35c7c640de Add optional debug dumping of postvs SPIR-V 2020-06-05 15:15:42 +01:00
baldurk 7dda3770e4 Generate consistent names for unnamed shader I/O signatures 2020-06-05 14:32:54 +01:00
baldurk 8ff6251d98 Handle hlsl/glsl matrix dimension order properly in buffer formatter 2020-06-05 14:19:39 +01:00
baldurk 44ab5e9928 Fix crash in shader debugging with unbound (but unused) descriptor sets 2020-06-05 13:23:54 +01:00
baldurk bdead116eb Handle NULL/out of bounds vertex buffer data in D3D11 shader debugging 2020-06-03 18:41:12 +01:00
baldurk 72ac2cd6d4 Fix copy-paste errors 2020-06-03 18:41:12 +01:00
baldurk 00f0d8c7b7 Remove virtual from ID3DXXDeviceChild::Shutdown 2020-06-03 18:41:12 +01:00
baldurk ebb8108781 Fix wrong enum comparisons 2020-06-03 18:41:11 +01:00
baldurk ee02cfa130 Consistently use descriptor slots as array
* Even for inline uniform block where we know there's only one slot
2020-06-03 18:41:11 +01:00
baldurk 6fcd34dd0d Add missing cast to Vec4u 2020-06-03 18:41:11 +01:00
baldurk e2757ac7f4 Fix old reference to m_InternalElement as bool 2020-06-03 18:41:11 +01:00
baldurk 6083f5a713 Handle buffers being a NULL pointer in glBindBuffersBase 2020-06-03 18:41:11 +01:00
baldurk 3912085c5f Check output pointer before writing 2020-06-03 18:41:11 +01:00
baldurk f9c1f24c0c DDX/DDY are always float typed 2020-06-03 18:41:11 +01:00
baldurk d32cca113d Read size as unsigned int, so that buffers over 2GB (!!) work OK 2020-06-03 18:41:11 +01:00
baldurk 9524438129 End active unbalanced queries/transform feedback after active replay
* Some drivers have issues doing normal work while queries or XFB are active,
  and there's no reason to keep them active indefinitely since they might not be
  closed by a subsequent draw replay (if multiple draws are spanned and we
  select a draw in the middle).
2020-06-03 18:41:11 +01:00
Aliya Pazylbekova 7e66573e05 Vk Pixel history: a few fixes
1) A depth image might have different number of samples, tested on a
   case where there is a resolve attachment on vkCmdEndRenderPass, but
   the depth attachment is multisampled.
2) HasMultipleSubpasses should take into accoun the case when there is
   no renderpass, for example post vkCmdEndRenderPass
2020-06-03 18:40:57 +01:00
baldurk 0219637734 Fix resize_for_index test 2020-06-01 22:39:26 +01:00
baldurk 5d2cfe9897 Handle stringising 64-bit enums 2020-06-01 21:54:43 +01:00
baldurk 0f8ad41359 Add rdcarray helper for "resize array up to this index if smaller"
* This is a common enough operation to warrant a helper, as an alternative to
  vec.resize(RDCMAX(index + 1, vec.size())
2020-06-01 21:54:43 +01:00
baldurk 4a5bd147e1 Fix Draw_Zoo tests 2020-06-01 21:54:43 +01:00
Camille Martel 0f7875a224 Don't call CheckImplicitThread when GL hook is disabled 2020-05-29 23:47:00 +01:00
baldurk e472536c5a Don't read off end of capture if CaptureEnd chunk is missing 2020-05-29 17:49:57 +01:00
baldurk a8f6108444 Try to clamp indices when accessing in SPIR-V debugging 2020-05-29 17:26:47 +01:00
baldurk a0a373a8e1 Fix handling of buffer truncation and zero-sized buffers 2020-05-29 17:26:29 +01:00
baldurk 9f0787da33 Keep subpass self-dependencies when making loadRPs. 2020-05-29 14:11:03 +01:00
baldurk 86e0ed1d26 Don't suspend children on linux unless we're injecting 2020-05-29 14:10:52 +01:00
baldurk a5e3346975 Pass /bigobj when compiling vk_serialise.cpp to fix VS2019 2020-05-28 18:29:21 +01:00
baldurk 97f9982f4b Fix compilation on android 2020-05-28 16:45:08 +01:00
baldurk 55e1f462ca Disable defines of memset/memcpy that confuse visual assist
* These are only for the opencl build, which we don't care about.
2020-05-28 15:54:36 +01:00
baldurk d0d2f65a11 Implement support for VK_EXT_private_data 2020-05-28 15:54:36 +01:00
baldurk 58ed167abf Implement support for VK_EXT_pipeline_creation_cache_control 2020-05-28 15:54:36 +01:00
baldurk 1cd32d3f61 Implement support for VK_EXT_robustness2 2020-05-28 15:54:36 +01:00
baldurk c41b72edb7 Fix off-by-one error checking for D3D12 descriptor range inclusion 2020-05-28 15:54:35 +01:00