}
gs->input_primitive =
- gs->info.properties[TGSI_PROPERTY_GS_INPUT_PRIM][0];
+ gs->info.properties[TGSI_PROPERTY_GS_INPUT_PRIM];
gs->output_primitive =
- gs->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM][0];
+ gs->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM];
gs->max_output_vertices =
- gs->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES][0];
+ gs->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES];
if (!gs->max_output_vertices)
gs->max_output_vertices = 32;
bld.bld_base.op_actions[TGSI_OPCODE_ENDPRIM].emit = end_primitive;
max_output_vertices =
- info->properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES][0];
+ info->properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES];
if (!max_output_vertices)
max_output_vertices = 32;
unsigned name = fullprop->Property.PropertyName;
assert(name < Elements(info->properties));
- memcpy(info->properties[name],
- fullprop->u, 8 * sizeof(unsigned));
+ info->properties[name] = fullprop->u[0].Data;
}
break;
*/
if (procType == TGSI_PROCESSOR_GEOMETRY) {
unsigned input_primitive =
- info->properties[TGSI_PROPERTY_GS_INPUT_PRIM][0];
+ info->properties[TGSI_PROPERTY_GS_INPUT_PRIM];
int num_verts = u_vertices_per_prim(input_primitive);
int j;
info->file_count[TGSI_FILE_INPUT] = num_verts;
*/
unsigned indirect_files;
- unsigned properties[TGSI_PROPERTY_COUNT][8]; /* index with TGSI_PROPERTY_ */
+ unsigned properties[TGSI_PROPERTY_COUNT]; /* index with TGSI_PROPERTY_ */
};
extern void
tgsi_scan_shader(fs->tokens, &transform.info);
transform.coordOrigin =
- transform.info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN][0];
+ transform.info.properties[TGSI_PROPERTY_FS_COORD_ORIGIN];
tgsi_transform_shader(fs->tokens,
(struct tgsi_token *) new_fs->tokens,
/* 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. */
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
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))
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");
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++) {
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);
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;
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];
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]) {
{
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;
== 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;
}