intel: rework cmd helpers
In the hope that the new helpers are easier to use.
An important change is that the units used for a writer are changed from
dwords to bytes. Helpers may still use dwords when it is more natural.
diff --git a/icd/intel/cmd.h b/icd/intel/cmd.h
index 4d9daf7..5443de7 100644
--- a/icd/intel/cmd.h
+++ b/icd/intel/cmd.h
@@ -128,7 +128,7 @@
struct intel_cmd_shader {
const struct intel_pipeline_shader *shader;
- XGL_UINT kernel_pos;
+ uint32_t kernel_offset;
};
/*
@@ -199,12 +199,11 @@
};
struct intel_cmd_writer {
+ XGL_SIZE size;
struct intel_bo *bo;
void *ptr;
- /* in DWords */
- XGL_UINT size;
- XGL_UINT used;
+ XGL_SIZE used;
};
struct intel_cmd {
@@ -252,7 +251,7 @@
&cmd->writers[INTEL_CMD_WRITER_BATCH];
if (used)
- *used = sizeof(uint32_t) * writer->used;
+ *used = writer->used;
return writer->bo;
}