mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
r300: re-format using clang-format
No manual changes here, this is simply running $ ninja -C build/ clang-format Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37224>
This commit is contained in:
parent
92e329ba5a
commit
72ba6bbbe3
13 changed files with 88 additions and 83 deletions
|
|
@ -11,8 +11,6 @@
|
||||||
#include "compiler/nir/nir_worklist.h"
|
#include "compiler/nir/nir_worklist.h"
|
||||||
#include "compiler/radeon_code.h"
|
#include "compiler/radeon_code.h"
|
||||||
#include "compiler/radeon_program_constants.h"
|
#include "compiler/radeon_program_constants.h"
|
||||||
#include "r300_nir.h"
|
|
||||||
#include "r300_screen.h"
|
|
||||||
#include "pipe/p_screen.h"
|
#include "pipe/p_screen.h"
|
||||||
#include "pipe/p_state.h"
|
#include "pipe/p_state.h"
|
||||||
#include "tgsi/tgsi_dump.h"
|
#include "tgsi/tgsi_dump.h"
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ remove_clip_vertex(nir_builder *b, nir_instr *instr, UNUSED void *_)
|
||||||
if (deref->deref_type == nir_deref_type_var &&
|
if (deref->deref_type == nir_deref_type_var &&
|
||||||
deref->var->data.mode == nir_var_shader_out &&
|
deref->var->data.mode == nir_var_shader_out &&
|
||||||
deref->var->data.location == VARYING_SLOT_CLIP_VERTEX) {
|
deref->var->data.location == VARYING_SLOT_CLIP_VERTEX) {
|
||||||
nir_foreach_use_safe(src, &deref->def) {
|
nir_foreach_use_safe (src, &deref->def) {
|
||||||
nir_instr_remove(nir_src_parent_instr(src));
|
nir_instr_remove(nir_src_parent_instr(src));
|
||||||
}
|
}
|
||||||
nir_instr_remove(instr);
|
nir_instr_remove(instr);
|
||||||
|
|
@ -147,12 +147,12 @@ r300_optimize_nir(struct nir_shader *s, struct r300_screen *screen)
|
||||||
if (nir_shader_instructions_pass(s, remove_clip_vertex,
|
if (nir_shader_instructions_pass(s, remove_clip_vertex,
|
||||||
nir_metadata_control_flow, NULL)) {
|
nir_metadata_control_flow, NULL)) {
|
||||||
unsigned clip_vertex_location = 0;
|
unsigned clip_vertex_location = 0;
|
||||||
nir_foreach_variable_with_modes(var, s, nir_var_shader_out) {
|
nir_foreach_variable_with_modes (var, s, nir_var_shader_out) {
|
||||||
if (var->data.location == VARYING_SLOT_CLIP_VERTEX) {
|
if (var->data.location == VARYING_SLOT_CLIP_VERTEX) {
|
||||||
clip_vertex_location = var->data.driver_location;
|
clip_vertex_location = var->data.driver_location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nir_foreach_variable_with_modes(var, s, nir_var_shader_out) {
|
nir_foreach_variable_with_modes (var, s, nir_var_shader_out) {
|
||||||
if (var->data.driver_location > clip_vertex_location) {
|
if (var->data.driver_location > clip_vertex_location) {
|
||||||
var->data.driver_location--;
|
var->data.driver_location--;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ static inline bool
|
||||||
is_only_used_by_intrinsic(const nir_alu_instr *instr, nir_intrinsic_op op)
|
is_only_used_by_intrinsic(const nir_alu_instr *instr, nir_intrinsic_op op)
|
||||||
{
|
{
|
||||||
bool is_used = false;
|
bool is_used = false;
|
||||||
nir_foreach_use(src, &instr->def) {
|
nir_foreach_use (src, &instr->def) {
|
||||||
is_used = true;
|
is_used = true;
|
||||||
|
|
||||||
nir_instr *user_instr = nir_src_parent_instr(src);
|
nir_instr *user_instr = nir_src_parent_instr(src);
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,9 @@
|
||||||
|
|
||||||
struct rc_swizzle_caps;
|
struct rc_swizzle_caps;
|
||||||
|
|
||||||
enum rc_program_type { RC_VERTEX_PROGRAM, RC_FRAGMENT_PROGRAM, RC_NUM_PROGRAM_TYPES };
|
enum rc_program_type { RC_VERTEX_PROGRAM,
|
||||||
|
RC_FRAGMENT_PROGRAM,
|
||||||
|
RC_NUM_PROGRAM_TYPES };
|
||||||
|
|
||||||
struct radeon_compiler {
|
struct radeon_compiler {
|
||||||
struct memory_pool Pool;
|
struct memory_pool Pool;
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,8 @@ struct rc_sub_instruction {
|
||||||
rc_omod_op Omod;
|
rc_omod_op Omod;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum { RC_INSTRUCTION_NORMAL = 0, RC_INSTRUCTION_PAIR } rc_instruction_type;
|
typedef enum { RC_INSTRUCTION_NORMAL = 0,
|
||||||
|
RC_INSTRUCTION_PAIR } rc_instruction_type;
|
||||||
|
|
||||||
struct rc_instruction {
|
struct rc_instruction {
|
||||||
struct rc_instruction *Prev;
|
struct rc_instruction *Prev;
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,9 @@ is_swizzle_inline_constant(rc_swizzle swizzle)
|
||||||
#define RC_MASK_XYZW (RC_MASK_X | RC_MASK_Y | RC_MASK_Z | RC_MASK_W)
|
#define RC_MASK_XYZW (RC_MASK_X | RC_MASK_Y | RC_MASK_Z | RC_MASK_W)
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
||||||
typedef enum { RC_ALURESULT_NONE = 0, RC_ALURESULT_X, RC_ALURESULT_W } rc_write_aluresult;
|
typedef enum { RC_ALURESULT_NONE = 0,
|
||||||
|
RC_ALURESULT_X,
|
||||||
|
RC_ALURESULT_W } rc_write_aluresult;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RC_PRESUB_NONE = 0,
|
RC_PRESUB_NONE = 0,
|
||||||
|
|
@ -186,6 +188,8 @@ rc_presubtract_src_reg_count(rc_presubtract_op op)
|
||||||
#define RC_SOURCE_RGB 0x1
|
#define RC_SOURCE_RGB 0x1
|
||||||
#define RC_SOURCE_ALPHA 0x2
|
#define RC_SOURCE_ALPHA 0x2
|
||||||
|
|
||||||
typedef enum { RC_PRED_DISABLED, RC_PRED_SET, RC_PRED_INV } rc_predicate_mode;
|
typedef enum { RC_PRED_DISABLED,
|
||||||
|
RC_PRED_SET,
|
||||||
|
RC_PRED_INV } rc_predicate_mode;
|
||||||
|
|
||||||
#endif /* RADEON_PROGRAM_CONSTANTS_H */
|
#endif /* RADEON_PROGRAM_CONSTANTS_H */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue