anv: Add an anv_physical_device field to anv_device
Having to always pull the physical device from the instance has been annoying for almost as long as the driver has existed. It also won't work in a world where we ever have more than one physical device. This commit adds a new field called "physical" to anv_device and switches every location where we use device->instance->physicalDevice to use the new field instead. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461>
This commit is contained in:
committed by
Marge Bot
parent
735a3ba007
commit
70e8064e13
@@ -27,13 +27,11 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct anv_instance instance = {
|
||||
.physicalDevice = {
|
||||
.use_softpin = true,
|
||||
},
|
||||
struct anv_physical_device physical_device = {
|
||||
.use_softpin = true,
|
||||
};
|
||||
struct anv_device device = {
|
||||
.instance = &instance,
|
||||
.physical = &physical_device,
|
||||
};
|
||||
struct anv_block_pool pool;
|
||||
|
||||
|
||||
@@ -111,9 +111,9 @@ static void validate_monotonic(int32_t **blocks)
|
||||
|
||||
static void run_test()
|
||||
{
|
||||
struct anv_instance instance = { };
|
||||
struct anv_physical_device physical_device = { };
|
||||
struct anv_device device = {
|
||||
.instance = &instance,
|
||||
.physical = &physical_device,
|
||||
};
|
||||
struct anv_block_pool pool;
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct anv_instance instance = { };
|
||||
struct anv_physical_device physical_device = { };
|
||||
struct anv_device device = {
|
||||
.instance = &instance,
|
||||
.physical = &physical_device,
|
||||
};
|
||||
struct anv_state_pool state_pool;
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct anv_instance instance = { };
|
||||
struct anv_physical_device physical_device = { };
|
||||
struct anv_device device = {
|
||||
.instance = &instance,
|
||||
.physical = &physical_device,
|
||||
};
|
||||
struct anv_state_pool state_pool;
|
||||
|
||||
|
||||
@@ -56,9 +56,9 @@ static void *alloc_states(void *_job)
|
||||
|
||||
static void run_test()
|
||||
{
|
||||
struct anv_instance instance = { };
|
||||
struct anv_physical_device physical_device = { };
|
||||
struct anv_device device = {
|
||||
.instance = &instance,
|
||||
.physical = &physical_device,
|
||||
};
|
||||
struct anv_state_pool state_pool;
|
||||
|
||||
|
||||
@@ -27,13 +27,11 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct anv_instance instance = {
|
||||
.physicalDevice = {
|
||||
.use_softpin = true,
|
||||
},
|
||||
struct anv_physical_device physical_device = {
|
||||
.use_softpin = true,
|
||||
};
|
||||
struct anv_device device = {
|
||||
.instance = &instance,
|
||||
.physical = &physical_device,
|
||||
};
|
||||
struct anv_state_pool state_pool;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user