Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mesa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Erik Faye-Lund
mesa
Commits
7c36f9eb
Commit
7c36f9eb
authored
Apr 12, 2016
by
Connor Abbott
Committed by
Jason Ekstrand
May 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vc4: fixup for new nir_foreach_block()
Reviewed-by:
Eric Anholt
<
eric@anholt.net
>
parent
582815d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
48 deletions
+20
-48
src/gallium/drivers/vc4/vc4_nir_lower_blend.c
src/gallium/drivers/vc4/vc4_nir_lower_blend.c
+4
-5
src/gallium/drivers/vc4/vc4_nir_lower_io.c
src/gallium/drivers/vc4/vc4_nir_lower_io.c
+5
-15
src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c
src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c
+7
-17
src/gallium/drivers/vc4/vc4_program.c
src/gallium/drivers/vc4/vc4_program.c
+4
-11
No files found.
src/gallium/drivers/vc4/vc4_nir_lower_blend.c
View file @
7c36f9eb
...
...
@@ -674,10 +674,8 @@ vc4_nir_lower_blend_instr(struct vc4_compile *c, nir_builder *b,
}
static
bool
vc4_nir_lower_blend_block
(
nir_block
*
block
,
void
*
state
)
vc4_nir_lower_blend_block
(
nir_block
*
block
,
struct
vc4_compile
*
c
)
{
struct
vc4_compile
*
c
=
state
;
nir_foreach_instr_safe
(
instr
,
block
)
{
if
(
instr
->
type
!=
nir_instr_type_intrinsic
)
continue
;
...
...
@@ -714,8 +712,9 @@ vc4_nir_lower_blend(nir_shader *s, struct vc4_compile *c)
{
nir_foreach_function
(
function
,
s
)
{
if
(
function
->
impl
)
{
nir_foreach_block_call
(
function
->
impl
,
vc4_nir_lower_blend_block
,
c
);
nir_foreach_block
(
block
,
function
->
impl
)
{
vc4_nir_lower_blend_block
(
block
,
c
);
}
nir_metadata_preserve
(
function
->
impl
,
nir_metadata_block_index
|
...
...
src/gallium/drivers/vc4/vc4_nir_lower_io.c
View file @
7c36f9eb
...
...
@@ -428,25 +428,15 @@ vc4_nir_lower_io_instr(struct vc4_compile *c, nir_builder *b,
}
static
bool
vc4_nir_lower_io_
block
(
nir_block
*
block
,
void
*
arg
)
vc4_nir_lower_io_
impl
(
struct
vc4_compile
*
c
,
nir_function_impl
*
impl
)
{
struct
vc4_compile
*
c
=
arg
;
nir_function_impl
*
impl
=
nir_cf_node_get_function
(
&
block
->
cf_node
);
nir_builder
b
;
nir_builder_init
(
&
b
,
impl
);
nir_foreach_instr_safe
(
instr
,
block
)
vc4_nir_lower_io_instr
(
c
,
&
b
,
instr
);
return
true
;
}
static
bool
vc4_nir_lower_io_impl
(
struct
vc4_compile
*
c
,
nir_function_impl
*
impl
)
{
nir_foreach_block_call
(
impl
,
vc4_nir_lower_io_block
,
c
);
nir_foreach_block
(
block
,
impl
)
{
nir_foreach_instr_safe
(
instr
,
block
)
vc4_nir_lower_io_instr
(
c
,
&
b
,
instr
);
}
nir_metadata_preserve
(
impl
,
nir_metadata_block_index
|
nir_metadata_dominance
);
...
...
src/gallium/drivers/vc4/vc4_nir_lower_txf_ms.c
View file @
7c36f9eb
...
...
@@ -130,30 +130,20 @@ vc4_nir_lower_txf_ms_instr(struct vc4_compile *c, nir_builder *b,
}
static
bool
vc4_nir_lower_txf_ms_
block
(
nir_block
*
block
,
void
*
arg
)
vc4_nir_lower_txf_ms_
impl
(
struct
vc4_compile
*
c
,
nir_function_impl
*
impl
)
{
struct
vc4_compile
*
c
=
arg
;
nir_function_impl
*
impl
=
nir_cf_node_get_function
(
&
block
->
cf_node
);
nir_builder
b
;
nir_builder_init
(
&
b
,
impl
);
nir_foreach_instr_safe
(
instr
,
block
)
{
if
(
instr
->
type
==
nir_instr_type_tex
)
{
vc4_nir_lower_txf_ms_instr
(
c
,
&
b
,
nir_instr_as_tex
(
instr
));
nir_foreach_block
(
block
,
impl
)
{
nir_foreach_instr_safe
(
instr
,
block
)
{
if
(
instr
->
type
==
nir_instr_type_tex
)
{
vc4_nir_lower_txf_ms_instr
(
c
,
&
b
,
nir_instr_as_tex
(
instr
));
}
}
}
return
true
;
}
static
bool
vc4_nir_lower_txf_ms_impl
(
struct
vc4_compile
*
c
,
nir_function_impl
*
impl
)
{
nir_foreach_block_call
(
impl
,
vc4_nir_lower_txf_ms_block
,
c
);
nir_metadata_preserve
(
impl
,
nir_metadata_block_index
|
nir_metadata_dominance
);
...
...
src/gallium/drivers/vc4/vc4_program.c
View file @
7c36f9eb
...
...
@@ -1737,16 +1737,6 @@ static const nir_shader_compiler_options nir_options = {
.
lower_negate
=
true
,
};
static
bool
count_nir_instrs_in_block
(
nir_block
*
block
,
void
*
state
)
{
int
*
count
=
(
int
*
)
state
;
nir_foreach_instr
(
instr
,
block
)
{
*
count
=
*
count
+
1
;
}
return
true
;
}
static
int
count_nir_instrs
(
nir_shader
*
nir
)
{
...
...
@@ -1754,7 +1744,10 @@ count_nir_instrs(nir_shader *nir)
nir_foreach_function
(
function
,
nir
)
{
if
(
!
function
->
impl
)
continue
;
nir_foreach_block_call
(
function
->
impl
,
count_nir_instrs_in_block
,
&
count
);
nir_foreach_block
(
block
,
function
->
impl
)
{
nir_foreach_instr
(
instr
,
block
)
count
++
;
}
}
return
count
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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