Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kenneth Graunke
mesa
Commits
c6899653
Commit
c6899653
authored
May 02, 2022
by
Kenneth Graunke
Browse files
HACK: Add IRIS_INDIRECT=1 for hacky performance tests of indirect draws
parent
82029aed
Pipeline
#723264
waiting for manual action with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/gallium/drivers/iris/iris_draw.c
View file @
c6899653
...
...
@@ -309,6 +309,29 @@ iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info,
iris_handle_always_flush_cache
(
batch
);
struct
pipe_draw_indirect_info
indirect_hack
=
{};
if
(
screen
->
indirect_hack
&&
!
indirect
)
{
unsigned
dwords
=
info
->
index_size
?
5
:
4
;
void
*
v_map
;
u_upload_alloc
(
ctx
->
stream_uploader
,
0
,
dwords
*
sizeof
(
uint32_t
),
4
,
&
indirect_hack
.
offset
,
&
indirect_hack
.
buffer
,
&
v_map
);
indirect_hack
.
draw_count
=
1
;
uint32_t
*
map
=
v_map
;
map
[
0
]
=
draws
[
0
].
count
;
map
[
1
]
=
info
->
instance_count
;
map
[
2
]
=
draws
[
0
].
start
;
if
(
info
->
index_size
)
{
map
[
3
]
=
draws
[
0
].
index_bias
;
map
[
4
]
=
info
->
start_instance
;
}
else
{
map
[
3
]
=
info
->
start_instance
;
}
indirect
=
&
indirect_hack
;
}
if
(
indirect
&&
indirect
->
buffer
)
iris_indirect_draw_vbo
(
ice
,
info
,
drawid_offset
,
indirect
,
&
draws
[
0
]);
else
...
...
@@ -320,6 +343,8 @@ iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info,
ice
->
state
.
dirty
&=
~
IRIS_ALL_DIRTY_FOR_RENDER
;
ice
->
state
.
stage_dirty
&=
~
IRIS_ALL_STAGE_DIRTY_FOR_RENDER
;
pipe_resource_reference
(
&
indirect_hack
.
buffer
,
NULL
);
}
static
void
...
...
src/gallium/drivers/iris/iris_screen.c
View file @
c6899653
...
...
@@ -931,5 +931,7 @@ iris_screen_create(int fd, const struct pipe_screen_config *config)
return
NULL
;
}
screen
->
indirect_hack
=
env_var_as_boolean
(
"IRIS_INDIRECT"
,
false
);
return
pscreen
;
}
src/gallium/drivers/iris/iris_screen.h
View file @
c6899653
...
...
@@ -229,6 +229,8 @@ struct iris_screen {
/** Every screen on a bufmgr has an unique ID assigned by the bufmgr. */
int
id
;
bool
indirect_hack
;
};
struct
pipe_screen
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment