diff options
author | Marek Olšák <[email protected]> | 2014-10-02 16:36:51 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-10-04 15:36:39 +0200 |
commit | 0c4bc1e29223ffec4617999c0c03d722bdcc170a (patch) | |
tree | ecae2a4b7708df339d2189a156357a9d4aa2452c /src/gallium/drivers | |
parent | 1f6c0b55df9f3553b18062ad2c7e2dc021d4c731 (diff) |
tgsi: change tgsi_shader_info::properties to a one-dimensional array
Reviewed-by: Roland Scheidegger <[email protected]>
v2: fix svga too
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_fs.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_quad_blend.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_setup.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_state_fs.c | 2 |
8 files changed, 15 insertions, 15 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index c344fc07b0c..a7a55f8301c 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -2213,7 +2213,7 @@ generate_fragment(struct llvmpipe_context *lp, /* check if writes to cbuf[0] are to be copied to all cbufs */ cbuf0_write_all = - shader->info.base.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0]; + shader->info.base.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]; /* TODO: actually pick these based on the fs and color buffer * characteristics. */ @@ -2324,7 +2324,7 @@ generate_fragment(struct llvmpipe_context *lp, num_loop, "mask_store"); LLVMValueRef color_store[PIPE_MAX_COLOR_BUFS][TGSI_NUM_CHANNELS]; boolean pixel_center_integer = - shader->info.base.properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER][0]; + shader->info.base.properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER]; /* * The shader input interpolation info is not explicitely baked in the diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c index 774b14b0a47..81543bae986 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c @@ -1138,11 +1138,11 @@ _nvfx_fragprog_translate(uint16_t oclass, struct nv30_fragprog *fp) fpc->num_regs = 2; memset(fp->texcoord, 0xff, sizeof(fp->texcoord)); - if (fp->info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN][0]) + if (fp->info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN]) fp->coord_conventions |= NV30_3D_COORD_CONVENTIONS_ORIGIN_INVERTED; - if (fp->info.properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER][0]) + if (fp->info.properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER]) fp->coord_conventions |= NV30_3D_COORD_CONVENTIONS_CENTER_INTEGER; - if (fp->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0]) + if (fp->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]) fp->rt_enable |= NV30_3D_RT_ENABLE_MRT; if (!nvfx_fragprog_prepare(fpc)) diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index ddf944a28eb..c00f55f5d90 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -469,7 +469,7 @@ static void r300_translate_fragment_shader( find_output_registers(&compiler, shader); shader->write_all = - shader->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0]; + shader->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]; if (compiler.Base.Debug & RC_DBG_LOG) { DBG(r300, DBG_FP, "r300: Initial fragment program\n"); diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 8680824076b..6ac39e88496 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1487,7 +1487,7 @@ static void si_llvm_emit_fs_epilogue(struct lp_build_tgsi_context * bld_base) memcpy(last_args, args, sizeof(args)); /* Handle FS_COLOR0_WRITES_ALL_CBUFS. */ - if (shader->selector->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0] && + if (shader->selector->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS] && shader->output[i].sid == 0 && si_shader_ctx->shader->key.ps.nr_cbufs > 1) { for (int c = 1; c < si_shader_ctx->shader->key.ps.nr_cbufs; c++) { @@ -2867,7 +2867,7 @@ int si_shader_create(struct si_screen *sscreen, struct si_shader *shader) si_shader_ctx.radeon_bld.load_input = declare_input_fs; bld_base->emit_epilogue = si_llvm_emit_fs_epilogue; - switch (sel->info.properties[TGSI_PROPERTY_FS_DEPTH_LAYOUT][0]) { + switch (sel->info.properties[TGSI_PROPERTY_FS_DEPTH_LAYOUT]) { case TGSI_FS_DEPTH_LAYOUT_GREATER: shader->db_shader_control |= S_02880C_CONSERVATIVE_Z_EXPORT(V_02880C_EXPORT_GREATER_THAN_Z); diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 88a50f37651..57bfa591c56 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -2214,7 +2214,7 @@ static INLINE void si_shader_selector_key(struct pipe_context *ctx, key->vs.gs_used_inputs = sctx->gs_shader->gs_used_inputs; } } else if (sel->type == PIPE_SHADER_FRAGMENT) { - if (sel->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0]) + if (sel->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]) key->ps.nr_cbufs = sctx->framebuffer.state.nr_cbufs; key->ps.export_16bpc = sctx->framebuffer.export_16bpc; @@ -2312,9 +2312,9 @@ static void *si_create_shader_state(struct pipe_context *ctx, switch (pipe_shader_type) { case PIPE_SHADER_GEOMETRY: sel->gs_output_prim = - sel->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM][0]; + sel->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM]; sel->gs_max_out_vertices = - sel->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES][0]; + sel->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES]; for (i = 0; i < sel->info.num_inputs; i++) { unsigned name = sel->info.input_semantic_name[i]; diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c index d60e5087ac0..a32bd7fd241 100644 --- a/src/gallium/drivers/softpipe/sp_quad_blend.c +++ b/src/gallium/drivers/softpipe/sp_quad_blend.c @@ -924,7 +924,7 @@ blend_fallback(struct quad_stage *qs, const struct pipe_blend_state *blend = softpipe->blend; unsigned cbuf; boolean write_all = - softpipe->fs_variant->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0]; + softpipe->fs_variant->info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]; for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++) { if (softpipe->framebuffer.cbufs[cbuf]) { diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index 989ed9c601b..6704015112b 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -563,9 +563,9 @@ setup_fragcoord_coeff(struct setup_context *setup, uint slot) { const struct tgsi_shader_info *fsInfo = &setup->softpipe->fs_variant->info; boolean origin_lower_left = - fsInfo->properties[TGSI_PROPERTY_FS_COORD_ORIGIN][0]; + fsInfo->properties[TGSI_PROPERTY_FS_COORD_ORIGIN]; boolean pixel_center_integer = - fsInfo->properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER][0]; + fsInfo->properties[TGSI_PROPERTY_FS_COORD_PIXEL_CENTER]; /*X*/ setup->coef[slot].a0[0] = pixel_center_integer ? 0.0f : 0.5f; diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index 1e83d2e2da9..566a79407e5 100644 --- a/src/gallium/drivers/svga/svga_state_fs.c +++ b/src/gallium/drivers/svga/svga_state_fs.c @@ -338,7 +338,7 @@ make_fs_key(const struct svga_context *svga, == PIPE_SPRITE_COORD_LOWER_LEFT); /* SVGA_NEW_FRAME_BUFFER */ - if (fs->base.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS][0]) { + if (fs->base.info.properties[TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS]) { /* Replicate color0 output to N colorbuffers */ key->write_color0_to_n_cbufs = svga->curr.framebuffer.nr_cbufs; } |