The present invention relates to the technical field of
computer hardware modeling, and in particular to a GPU
occlusion query TLM device based on
SystemC. The GPU
occlusion query TLM device based on
SystemC comprises: step 1: a host generates an execution command, and sends the execution command to a command processor through a transaction-level interface; step 2: a
fragment processing unit receives and processes the glBeginQuery
function code issued by the command processor; step 3: the
fragment processing unit receives the fragment
data stream of the rasterization unit and performs fragment operations; step 4: the
fragment processing unit receives and processes the glEndQuery
function code issued by the command processor; step 5: the host calls glGetQueryObject to obtain
occlusion query results. The present invention implements a GPU occlusion query TLM device and operation method based on
SystemC, solves the problem of querying the number of fragments that pass the depth test in the current drawing process, so that it can be determined whether a group of geometric figures are visible after the depth test, and speeds up the
simulation.