how to use ID3D11Predicate correctly?

Oleksiy F 6 Reputation points
2022-05-27T21:20:53.613+00:00

ID3D11Query with D3D11_QUERY_OCCLUSION is pretty simple. Every frame after populating depth buffer with meshes - it's loop with the same meshes, where for every mesh it's begin query, draw call, end query, wait 2 frames, get data. And every mesh has its own query object naturally.

But how do I use ID3D11Predicate?

I do CreatePredicate with D3D11_QUERY_OCCLUSION_PREDICATE description, but what's next? What's the sequence of actions?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,527 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 11,496 Reputation points Microsoft Vendor
    2022-05-30T06:53:01.41+00:00

    There is a D3D12PredicationQueries sample you can learn. Anyway you can submit an issue for an ID3D11Predicate sample.

    0 comments No comments