This reverts 374dd5bae8
Fix i965 crash with bin/gl-3.1-vao-broken-attrib
The crash with i965 can't be reproduced anymore, and the Gallium
drivers do the correct checks to not crash there, so it is
not necessary to do the extra checking.
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Reviewed-by: Chia-I Wu <[email protected]>
Also change the interface of called functions to take sub_ctx
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Reviewed-by: Chia-I Wu <[email protected]>
When we want to pass sub contexts directly to the function to avoid
having to de-reference the context pointer all the time there are rare
cases when we need the pointer to the parent context (e.g. for error
reporting). For these cases we need to be able to get the parent context.
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Reviewed-by: Chia-I Wu <[email protected]>
Fix `run.sh` and `run_traces.sh` trace path handling by taking into
account that the `--trace` option may contain a multi-directory path
relative to traces-db.
Together with this fix, you should expect to find the output directory
of a perf testing session under the same directory of the trace file.
Signed-off-by: Antonio Caggiano <[email protected]>
Reviewed-by: Gert Wollny <[email protected]>
An untyped resource is a virgl_resource without pipe_resource while
vrend_context works with pipe_resources exclusively. When an untyped
resource is attached, we defer the insersion into res_hash until
VIRGL_CCMD_PIPE_RESOURCE_SET_TYPE is submitted.
Signed-off-by: Chia-I Wu <[email protected]>
Acked-by: Gert Wollny <[email protected]>
Acked-by: Gurchetan Singh <[email protected]> (protocol)
Track them with a list and a single-slot cache in vrend_context. The
cache hit rate is expected to be ~100%.
Signed-off-by: Chia-I Wu <[email protected]>
Acked-by: Gert Wollny <[email protected]>
egl_image always wraps gbm_bo so far so this is not a real issue. But
it will change soon.
Signed-off-by: Chia-I Wu <[email protected]>
Acked-by: Gert Wollny <[email protected]>
Make virgl_egl_image_from_dmabuf a generic helper. Add
virgl_egl_image_from_gbm_bo and virgl_egl_aux_plane_image_from_gbm_bo
that use the helper.
Signed-off-by: Chia-I Wu <[email protected]>
Acked-by: Gert Wollny <[email protected]>
Use helper variables for some pointer derefs and query the shader ID's
only once.
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
This info is only used when creating the shader key, so it can reside in
the sub context.
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
With that shaders that are used more frequently will remain at the
top of the list, and since the search in the shader program list is
linear, this should save some time.
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
This gives a 6% speed improvement with Unigine Heaven
v2: remove the unlikely for dual_src, the whole statement will
be changed later (Chia-I Wu)
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
if-chains can usually not be optimized very well, switch/case might be
implemented as a jump table.
v2: Add a break in bese before default (Chia-I Wu)
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
This makes the code a bit easier to read and may help the complier
to avoid needless dereferencing of pointers.
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
Comparing to VCMD_GET_{CAPS,CAPS2}, it allows any capset id/version
to be queried.
This is similar to linux's DRM_IOCTL_VIRTGPU_GET_CAPS.
Signed-off-by: Chia-I Wu <[email protected]>
Reviewed-by: Isaac Bosompem <[email protected]>