Discussion:
[PATCH 4/6] st/glx: constify some variables
(too old to reply)
Konstantin Kharlamov
2017-12-29 05:32:30 UTC
Permalink
Just a nice hint for both peoples and compilers.

Signed-off-by: Konstantin Kharlamov <Hi-***@yandex.ru>
---
src/gallium/state_trackers/glx/xlib/glx_getproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/state_trackers/glx/xlib/glx_getproc.c b/src/gallium/state_trackers/glx/xlib/glx_getproc.c
index e7564ad9cd..b0f04ceebc 100644
--- a/src/gallium/state_trackers/glx/xlib/glx_getproc.c
+++ b/src/gallium/state_trackers/glx/xlib/glx_getproc.c
@@ -43,7 +43,7 @@ struct name_address_pair {
};


-static struct name_address_pair GLX_functions[] = {
+static const struct name_address_pair GLX_functions[] = {
/*** GLX_VERSION_1_0 ***/
{ "glXChooseVisual", (__GLXextFuncPtr) glXChooseVisual },
{ "glXCopyContext", (__GLXextFuncPtr) glXCopyContext },
--
2.15.1
Konstantin Kharlamov
2017-12-29 05:32:29 UTC
Permalink
Just a nice hint for both peoples and compilers.

Signed-off-by: Konstantin Kharlamov <Hi-***@yandex.ru>
---
src/gallium/state_trackers/nine/nine_pipe.h | 2 +-
src/gallium/state_trackers/nine/nine_shader.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gallium/state_trackers/nine/nine_pipe.h b/src/gallium/state_trackers/nine/nine_pipe.h
index 6bd4a0c897..c8fef62827 100644
--- a/src/gallium/state_trackers/nine/nine_pipe.h
+++ b/src/gallium/state_trackers/nine/nine_pipe.h
@@ -201,7 +201,7 @@ compressed_format( D3DFORMAT fmt )
static inline boolean
depth_stencil_format( D3DFORMAT fmt )
{
- static D3DFORMAT allowed[] = {
+ static const D3DFORMAT allowed[] = {
D3DFMT_D16_LOCKABLE,
D3DFMT_D32,
D3DFMT_D15S1,
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index cc667ebfbc..42f0566083 100644
--- a/src/gallium/state_trackers/nine/nine_shader.c
+++ b/src/gallium/state_trackers/nine/nine_shader.c
@@ -378,7 +378,7 @@ struct sm1_instruction
struct sm1_src_param dst_rel[1];
struct sm1_dst_param dst[1];

- struct sm1_op_info *info;
+ const struct sm1_op_info *info;
};

static void
@@ -2901,7 +2901,7 @@ DECL_SPECIAL(COMMENT)
#define _OPI(o,t,vv1,vv2,pv1,pv2,d,s,h) \
{ D3DSIO_##o, TGSI_OPCODE_##t, { vv1, vv2 }, { pv1, pv2, }, d, s, h }

-struct sm1_op_info inst_table[] =
+static const struct sm1_op_info inst_table[] =
{
_OPI(NOP, NOP, V(0,0), V(3,0), V(0,0), V(3,0), 0, 0, SPECIAL(NOP)), /* 0 */
_OPI(MOV, MOV, V(0,0), V(3,0), V(0,0), V(3,0), 1, 1, NULL),
@@ -3008,10 +3008,10 @@ struct sm1_op_info inst_table[] =
_OPI(BREAKP, BRK, V(0,0), V(3,0), V(2,1), V(3,0), 0, 1, SPECIAL(BREAKP))
};

-struct sm1_op_info inst_phase =
+static const struct sm1_op_info inst_phase =
_OPI(PHASE, NOP, V(0,0), V(0,0), V(1,4), V(1,4), 0, 0, SPECIAL(PHASE));

-struct sm1_op_info inst_comment =
+static const struct sm1_op_info inst_comment =
_OPI(COMMENT, NOP, V(0,0), V(3,0), V(0,0), V(3,0), 0, 0, SPECIAL(COMMENT));

static void
@@ -3279,7 +3279,7 @@ sm1_parse_instruction(struct shader_translator *tx)
struct sm1_instruction *insn = &tx->insn;
HRESULT hr;
DWORD tok;
- struct sm1_op_info *info = NULL;
+ const struct sm1_op_info *info = NULL;
unsigned i;

sm1_parse_comments(tx, TRUE);
--
2.15.1
Konstantin Kharlamov
2017-12-29 05:32:31 UTC
Permalink
Signed-off-by: Konstantin Kharlamov <Hi-***@yandex.ru>
---
src/gallium/drivers/r600/eg_debug.c | 6 +++---
src/gallium/drivers/r600/evergreen_state.c | 6 +++---
src/gallium/drivers/r600/r600_isa.c | 6 +++---
src/gallium/drivers/r600/r600_pipe.h | 2 +-
src/gallium/drivers/r600/r600_state_common.c | 5 ++---
src/gallium/drivers/r600/r600_test_dma.c | 2 +-
6 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/src/gallium/drivers/r600/eg_debug.c b/src/gallium/drivers/r600/eg_debug.c
index ceb7c1672c..56195df296 100644
--- a/src/gallium/drivers/r600/eg_debug.c
+++ b/src/gallium/drivers/r600/eg_debug.c
@@ -78,7 +78,7 @@ static void print_named_value(FILE *file, const char *name, uint32_t value,
static void eg_dump_reg(FILE *file, unsigned offset, uint32_t value,
uint32_t field_mask)
{
- int r, f;
+ unsigned r, f;

for (r = 0; r < ARRAY_SIZE(egd_reg_table); r++) {
const struct eg_reg *reg = &egd_reg_table[r];
@@ -134,7 +134,7 @@ static void ac_parse_set_reg_packet(FILE *f, uint32_t *ib, unsigned count,
unsigned reg_offset)
{
unsigned reg = (ib[1] << 2) + reg_offset;
- int i;
+ unsigned i;

for (i = 0; i < count; i++)
eg_dump_reg(f, reg + i*4, ib[2+i], ~0);
@@ -149,7 +149,7 @@ static uint32_t *ac_parse_packet3(FILE *f, uint32_t *ib, int *num_dw,
unsigned op = PKT3_IT_OPCODE_G(ib[0]);
const char *predicate = PKT3_PREDICATE(ib[0]) ? "(predicate)" : "";
const char *compute_mode = (ib[0] & 0x2) ? "(C)" : "";
- int i;
+ unsigned i;

/* Print the name first. */
for (i = 0; i < ARRAY_SIZE(packet3_table); i++)
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index ecb9c598e3..1aae9097f3 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -3915,7 +3915,7 @@ static void evergreen_set_hw_atomic_buffers(struct pipe_context *ctx,
{
struct r600_context *rctx = (struct r600_context *)ctx;
struct r600_atomic_buffer_state *astate;
- int i, idx;
+ unsigned i, idx;

astate = &rctx->atomic_buffer_state;

@@ -3951,7 +3951,7 @@ static void evergreen_set_shader_buffers(struct pipe_context *ctx,
struct r600_tex_color_info color;
struct eg_buf_res_params buf_params;
struct r600_resource *resource;
- int i, idx;
+ unsigned i, idx;
unsigned old_mask;

if (shader != PIPE_SHADER_FRAGMENT &&
@@ -4042,7 +4042,7 @@ static void evergreen_set_shader_images(struct pipe_context *ctx,
const struct pipe_image_view *images)
{
struct r600_context *rctx = (struct r600_context *)ctx;
- int i;
+ unsigned i;
struct r600_image_view *rview;
struct pipe_resource *image;
struct r600_resource *resource;
diff --git a/src/gallium/drivers/r600/r600_isa.c b/src/gallium/drivers/r600/r600_isa.c
index 2633cdcdb9..0d3e93d141 100644
--- a/src/gallium/drivers/r600/r600_isa.c
+++ b/src/gallium/drivers/r600/r600_isa.c
@@ -557,7 +557,7 @@ int r600_isa_init(struct r600_context *ctx, struct r600_isa *isa) {

for (i = 0; i < ARRAY_SIZE(r600_alu_op_table); ++i) {
const struct alu_op_info *op = &r600_alu_op_table[i];
- unsigned opc;
+ int opc;
if (op->flags & AF_LDS || op->slots[isa->hw_class] == 0)
continue;
opc = op->opcode[isa->hw_class >> 1];
@@ -570,7 +570,7 @@ int r600_isa_init(struct r600_context *ctx, struct r600_isa *isa) {

for (i = 0; i < ARRAY_SIZE(fetch_op_table); ++i) {
const struct fetch_op_info *op = &fetch_op_table[i];
- unsigned opc = op->opcode[isa->hw_class];
+ int opc = op->opcode[isa->hw_class];
if ((op->flags & FF_GDS) || ((opc & 0xFF) != opc))
continue; /* ignore GDS ops and INST_MOD versions for now */
isa->fetch_map[opc] = i + 1;
@@ -578,7 +578,7 @@ int r600_isa_init(struct r600_context *ctx, struct r600_isa *isa) {

for (i = 0; i < ARRAY_SIZE(cf_op_table); ++i) {
const struct cf_op_info *op = &cf_op_table[i];
- unsigned opc = op->opcode[isa->hw_class];
+ int opc = op->opcode[isa->hw_class];
if (opc == -1)
continue;
/* using offset for CF_ALU_xxx opcodes because they overlap with other
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index e042edf2b4..65206b023d 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -560,7 +560,7 @@ struct r600_context {
bool gs_tri_strip_adj_fix;
boolean dual_src_blend;
unsigned zwritemask;
- int ps_iter_samples;
+ unsigned ps_iter_samples;

/* The list of all texture buffer objects in this context.
* This list is walked when a buffer is invalidated/reallocated and
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index e5a5a33367..ec8945f084 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -1291,7 +1291,7 @@ void r600_update_driver_const_buffers(struct r600_context *rctx, bool compute_on
}

static void *r600_alloc_buf_consts(struct r600_context *rctx, int shader_type,
- int array_size, uint32_t *base_offset)
+ unsigned array_size, uint32_t *base_offset)
{
struct r600_shader_driver_constants_info *info = &rctx->driver_consts[shader_type];
if (array_size + R600_UCP_SIZE > info->alloc_size) {
@@ -1433,14 +1433,13 @@ void eg_setup_buffer_constants(struct r600_context *rctx, int shader_type)
/* set sample xy locations as array of fragment shader constants */
void r600_set_sample_locations_constant_buffer(struct r600_context *rctx)
{
- int i;
struct pipe_context *ctx = &rctx->b.b;

assert(rctx->framebuffer.nr_samples < R600_UCP_SIZE);
assert(rctx->framebuffer.nr_samples <= ARRAY_SIZE(rctx->sample_positions)/4);

memset(rctx->sample_positions, 0, 4 * 4 * 16);
- for (i = 0; i < rctx->framebuffer.nr_samples; i++) {
+ for (unsigned i = 0; i < rctx->framebuffer.nr_samples; i++) {
ctx->get_sample_position(ctx, rctx->framebuffer.nr_samples, i, &rctx->sample_positions[4*i]);
/* Also fill in center-zeroed positions used for interpolateAtSample */
rctx->sample_positions[4*i + 2] = rctx->sample_positions[4*i + 0] - 0.5f;
diff --git a/src/gallium/drivers/r600/r600_test_dma.c b/src/gallium/drivers/r600/r600_test_dma.c
index 9e1ff9e5fe..af86ad386f 100644
--- a/src/gallium/drivers/r600/r600_test_dma.c
+++ b/src/gallium/drivers/r600/r600_test_dma.c
@@ -57,7 +57,7 @@ static void set_random_pixels(struct pipe_context *ctx,
{
struct pipe_transfer *t;
uint8_t *map;
- int x,y,z;
+ unsigned x,y,z;

map = pipe_transfer_map_3d(ctx, tex, 0, PIPE_TRANSFER_WRITE,
0, 0, 0, tex->width0, tex->height0,
--
2.15.1
Konstantin Kharlamov
2018-06-04 12:28:36 UTC
Permalink
I can't push them though
I'd like to add that for the future it would be better to
- send the patches for st and r600 as separate series, this would
make it easier to find reviewers
- when fixing warning to add the specific warnings you fixed to
the commit messages (actually Ian Romanick gave me that hint)
Best,
Gert
Thank you for R-bs, and tips!
Konstantin Kharlamov
2017-12-29 05:32:28 UTC
Permalink
Just a nice hint for both peoples and compilers.

Signed-off-by: Konstantin Kharlamov <Hi-***@yandex.ru>
---
src/gallium/drivers/r600/cayman_msaa.c | 2 +-
src/gallium/drivers/r600/evergreen_state.c | 2 +-
src/gallium/drivers/r600/r600_query.c | 2 +-
src/gallium/drivers/r600/r600_state.c | 12 ++++++------
src/gallium/drivers/r600/sb/sb_expr.cpp | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/gallium/drivers/r600/cayman_msaa.c b/src/gallium/drivers/r600/cayman_msaa.c
index 6bc307a4bc..c1294536d3 100644
--- a/src/gallium/drivers/r600/cayman_msaa.c
+++ b/src/gallium/drivers/r600/cayman_msaa.c
@@ -219,7 +219,7 @@ void cayman_emit_msaa_config(struct radeon_winsys_cs *cs, int nr_samples,

if (setup_samples > 1) {
/* indexed by log2(nr_samples) */
- unsigned max_dist[] = {
+ const unsigned max_dist[] = {
0,
eg_max_dist_2x,
eg_max_dist_4x,
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 0da665f634..ecb9c598e3 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1584,7 +1584,7 @@ static void evergreen_set_min_samples(struct pipe_context *ctx, unsigned min_sam
}

/* 8xMSAA */
-static uint32_t sample_locs_8x[] = {
+static const uint32_t sample_locs_8x[] = {
FILL_SREG(-1, 1, 1, 5, 3, -5, 5, 3),
FILL_SREG(-7, -1, -3, -7, 7, -3, -5, 7),
FILL_SREG(-1, 1, 1, 5, 3, -5, 5, 3),
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c
index 987da9a806..8194d6e7c7 100644
--- a/src/gallium/drivers/r600/r600_query.c
+++ b/src/gallium/drivers/r600/r600_query.c
@@ -1914,7 +1914,7 @@ void r600_query_fix_enabled_rb_mask(struct r600_common_screen *rscreen)
#define XG(group_, name_, query_type_, type_, result_type_) \
XFULL(name_, query_type_, type_, result_type_, R600_QUERY_GROUP_##group_)

-static struct pipe_driver_query_info r600_driver_query_list[] = {
+static const struct pipe_driver_query_info r600_driver_query_list[] = {
X("num-compilations", NUM_COMPILATIONS, UINT64, CUMULATIVE),
X("num-shaders-created", NUM_SHADERS_CREATED, UINT64, CUMULATIVE),
X("num-shader-cache-hits", NUM_SHADER_CACHE_HITS, UINT64, CUMULATIVE),
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index cbf860f45f..52adebe6cf 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -1220,22 +1220,22 @@ static void r600_set_framebuffer_state(struct pipe_context *ctx,
rctx->framebuffer.do_update_surf_dirtiness = true;
}

-static uint32_t sample_locs_2x[] = {
+static const uint32_t sample_locs_2x[] = {
FILL_SREG(-4, 4, 4, -4, -4, 4, 4, -4),
FILL_SREG(-4, 4, 4, -4, -4, 4, 4, -4),
};
-static unsigned max_dist_2x = 4;
+static const unsigned max_dist_2x = 4;

-static uint32_t sample_locs_4x[] = {
+static const uint32_t sample_locs_4x[] = {
FILL_SREG(-2, -2, 2, 2, -6, 6, 6, -6),
FILL_SREG(-2, -2, 2, 2, -6, 6, 6, -6),
};
-static unsigned max_dist_4x = 6;
-static uint32_t sample_locs_8x[] = {
+static const unsigned max_dist_4x = 6;
+static const uint32_t sample_locs_8x[] = {
FILL_SREG(-1, 1, 1, 5, 3, -5, 5, 3),
FILL_SREG(-7, -1, -3, -7, 7, -3, -5, 7),
};
-static unsigned max_dist_8x = 7;
+static const unsigned max_dist_8x = 7;

static void r600_get_sample_position(struct pipe_context *ctx,
unsigned sample_count,
diff --git a/src/gallium/drivers/r600/sb/sb_expr.cpp b/src/gallium/drivers/r600/sb/sb_expr.cpp
index 7a5d62c8e8..7ad48e8ad3 100644
--- a/src/gallium/drivers/r600/sb/sb_expr.cpp
+++ b/src/gallium/drivers/r600/sb/sb_expr.cpp
@@ -330,7 +330,7 @@ void expr_handler::apply_alu_src_mod(const bc_alu &bc, unsigned src,
}

void expr_handler::apply_alu_dst_mod(const bc_alu &bc, literal &v) {
- float omod_coeff[] = {2.0f, 4.0, 0.5f};
+ const float omod_coeff[] = {2.0f, 4.0, 0.5f};

if (bc.omod)
v = v.f * omod_coeff[bc.omod - 1];
--
2.15.1
Konstantin Kharlamov
2017-12-29 05:32:27 UTC
Permalink
Ported from radeonsi. Improves windowed glxgears ran as

vblank_mode=0 glxgears -info -geometry 0+0+512+512

from ≈2270 FPS to ≈2360 FPS. Tested with AMD TURKS.

Signed-off-by: Konstantin Kharlamov <Hi-***@yandex.ru>
---
src/gallium/drivers/r600/r600_texture.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 03cdcd22ee..6739553f94 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -1793,6 +1793,16 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
!(tex->resource.external_usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
continue;

+ /* Use a slow clear for small surfaces where the cost of
+ * the eliminate pass can be higher than the benefit of fast
+ * clear. AMDGPU-pro does this, but the numbers may differ.
+ *
+ * This helps on both dGPUs and APUs, even small ones.
+ */
+ if (tex->resource.b.b.nr_samples <= 1 &&
+ tex->resource.b.b.width0 * tex->resource.b.b.height0 <= 512 * 512)
+ continue;
+
{
/* 128-bit formats are unusupported */
if (tex->surface.bpe > 8) {
--
2.15.1
Konstantin Kharlamov
2018-01-01 07:38:37 UTC
Permalink
Ported from radeonsi. Improves windowed glxgears ran as

vblank_mode=0 glxgears -info -geometry 0+0+512+512

from ≈2270 FPS to ≈2360 FPS. Tested with AMD TURKS.

v2: turned out glxgears ignores the option above, the correct way would
be "512x512+0+0". Now it can be seen 512x512 actually loses 30 FPS.
300×300 however wins around a hundred FPS, and to leave some room in
case results may differ for other cards I want not to nitpick in search
of an optimum but to simply leave 300×300 in the code.
v3: remove redundant braces, and try harder for the mail to stick to
the rest of the series.

Signed-off-by: Konstantin Kharlamov <Hi-***@yandex.ru>
---
src/gallium/drivers/r600/r600_texture.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 03cdcd22ee..778e801136 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -1793,6 +1793,16 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
!(tex->resource.external_usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
continue;

+ /* Use a slow clear for small surfaces where the cost of
+ * the eliminate pass can be higher than the benefit of fast
+ * clear. AMDGPU-pro does this, but the numbers may differ.
+ *
+ * This helps on both dGPUs and APUs, even small ones.
+ */
+ if (tex->resource.b.b.nr_samples <= 1 &&
+ tex->resource.b.b.width0 * tex->resource.b.b.height0 <= 300 * 300)
+ continue;
+
{
/* 128-bit formats are unusupported */
if (tex->surface.bpe > 8) {
--
2.15.1
Gert Wollny
2018-06-03 12:42:03 UTC
Permalink
This gives me ~200 FPS more with a 200x200 glxgears window with both,
Barts and Ceder.
Post by Konstantin Kharlamov
Ported from radeonsi. Improves windowed glxgears ran as
vblank_mode=0 glxgears -info -geometry 0+0+512+512
from ≈2270 FPS to ≈2360 FPS. Tested with AMD TURKS.
v2: turned out glxgears ignores the option above, the correct way would
be "512x512+0+0". Now it can be seen 512x512 actually loses 30 FPS.
300×300 however wins around a hundred FPS, and to leave some room in
case results may differ for other cards I want not to nitpick in search
of an optimum but to simply leave 300×300 in the code.
v3: remove redundant braces, and try harder for the mail to stick to
the rest of the series.
---
src/gallium/drivers/r600/r600_texture.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gallium/drivers/r600/r600_texture.c
b/src/gallium/drivers/r600/r600_texture.c
index 03cdcd22ee..778e801136 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -1793,6 +1793,16 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
!(tex->resource.external_usage &
PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
continue;
+ /* Use a slow clear for small surfaces where the
cost of
+ * the eliminate pass can be higher than the benefit
of fast
+ * clear. AMDGPU-pro does this, but the numbers may
differ.
+ *
+ * This helps on both dGPUs and APUs, even small
ones.
+ */
+ if (tex->resource.b.b.nr_samples <= 1 &&
+ tex->resource.b.b.width0 * tex-
Post by Konstantin Kharlamov
resource.b.b.height0 <= 300 * 300)
+ continue;
+
{
/* 128-bit formats are unusupported */
if (tex->surface.bpe > 8) {
Konstantin Kharlamov
2017-12-29 05:32:32 UTC
Permalink
Signed-off-by: Konstantin Kharlamov <Hi-***@yandex.ru>
---
src/gallium/drivers/r600/r600_state_common.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index ec8945f084..dc5cc0ad2e 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -902,7 +902,6 @@ struct r600_pipe_shader_selector *r600_create_shader_state_tokens(struct pipe_co
unsigned pipe_shader_type)
{
struct r600_pipe_shader_selector *sel = CALLOC_STRUCT(r600_pipe_shader_selector);
- int i;

sel->type = pipe_shader_type;
sel->tokens = tgsi_dup_tokens(tokens);
--
2.15.1
Gert Wollny
2018-06-03 12:41:08 UTC
Permalink
This patch doesn't apply, the "int i" was deleted already; I didn't
find the commit though.
Post by Konstantin Kharlamov
---
src/gallium/drivers/r600/r600_state_common.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/gallium/drivers/r600/r600_state_common.c
b/src/gallium/drivers/r600/r600_state_common.c
index ec8945f084..dc5cc0ad2e 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -902,7 +902,6 @@ struct r600_pipe_shader_selector
*r600_create_shader_state_tokens(struct pipe_co
un
signed pipe_shader_type)
{
struct r600_pipe_shader_selector *sel =
CALLOC_STRUCT(r600_pipe_shader_selector);
- int i;
sel->type = pipe_shader_type;
sel->tokens = tgsi_dup_tokens(tokens);
Konstantin Kharlamov
2018-06-04 12:31:25 UTC
Permalink
Post by Gert Wollny
This patch doesn't apply, the "int i" was deleted already; I didn't
find the commit though.
Oh, well. Good thing somebody that cleaned it up already :)

Konstantin Kharlamov
2017-12-29 05:47:01 UTC
Permalink
I forgot to tell: there's actually lots of warnings for Wsign-compare, so if anybody wanted, it's something to look at. I fixed only as much of the code as I had a mood for :Ь
Mostly a quick run with -Wsign-compare. I didn't see any real problems
though except for the changes at r600_isa.c where a unsigned been
compared with -1.
No changes in piglit except for two unstable tests for me: dlist and
multiple-texture-reading.
Regarding how did I manage to run piglit given it hangs r600g: well, it
hangs in the very end on the same test, and really saves the results. So
even though piglit run requires me to reboot in the end, it still gives
most of results, except for, maybe, some dozens in the end.
P.S. I don't have commit rights.
r600g: do not use "fast-clear" for small textures
r600g: constify some variables
nine: constify some variables
st/glx: constify some variables
r600g: some -Wsign-compare fixes
r600g: fix unused variable warning
src/gallium/drivers/r600/cayman_msaa.c | 2 +-
src/gallium/drivers/r600/eg_debug.c | 6 +++---
src/gallium/drivers/r600/evergreen_state.c | 8 ++++----
src/gallium/drivers/r600/r600_isa.c | 6 +++---
src/gallium/drivers/r600/r600_pipe.h | 2 +-
src/gallium/drivers/r600/r600_query.c | 2 +-
src/gallium/drivers/r600/r600_state.c | 12 ++++++------
src/gallium/drivers/r600/r600_state_common.c | 6 ++----
src/gallium/drivers/r600/r600_test_dma.c | 2 +-
src/gallium/drivers/r600/r600_texture.c | 10 ++++++++++
src/gallium/drivers/r600/sb/sb_expr.cpp | 2 +-
src/gallium/state_trackers/glx/xlib/glx_getproc.c | 2 +-
src/gallium/state_trackers/nine/nine_pipe.h | 2 +-
src/gallium/state_trackers/nine/nine_shader.c | 10 +++++-----
14 files changed, 40 insertions(+), 32 deletions(-)
Loading...