vkr: bad resource should be fatal

There is no valid reason for the guest to pass bad resource ids.
Because resource creation failures are not propagated back to the guest,
they are the most common reason for the guest to pass bad resource ids.
When that happens, failing earlier makes things easier to debug.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
diff --git a/src/vkr_renderer.c b/src/vkr_renderer.c
index e86f3d2..7cdfba3 100644
--- a/src/vkr_renderer.c
+++ b/src/vkr_renderer.c
@@ -432,8 +432,10 @@
 
    att = util_hash_table_get(ctx->resource_table,
                              uintptr_to_pointer(args->pStream->resourceId));
-   if (!att)
+   if (!att) {
+      vkr_cs_decoder_set_fatal(&ctx->decoder);
       return;
+   }
 
    vkr_cs_encoder_set_stream(&ctx->encoder, att->resource->iov, att->resource->iov_count,
                              args->pStream->offset, args->pStream->size);
@@ -1959,8 +1961,8 @@
       uint32_t res_id = import_resource_info->resourceId;
       struct vkr_resource_attachment *att =
          util_hash_table_get(ctx->resource_table, uintptr_to_pointer(res_id));
-      if (!att || !att->resource) {
-         args->ret = VK_ERROR_INVALID_EXTERNAL_HANDLE;
+      if (!att) {
+         vkr_cs_decoder_set_fatal(&ctx->decoder);
          return;
       }
 
@@ -3840,8 +3842,8 @@
 
    struct vkr_resource_attachment *att =
       util_hash_table_get(ctx->resource_table, uintptr_to_pointer(args->resourceId));
-   if (!att || !att->resource) {
-      args->ret = VK_ERROR_INVALID_EXTERNAL_HANDLE;
+   if (!att) {
+      vkr_cs_decoder_set_fatal(&ctx->decoder);
       return;
    }