|
|
|
|
|
|
|
|
if (count == 0) |
|
|
if (count == 0) |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
BEGIN_CS(count * 5); |
|
|
|
|
|
|
|
|
BEGIN_CS(size); |
|
|
for(i = first; i < end; ++i) { |
|
|
for(i = first; i < end; ++i) { |
|
|
if (constants->Constants[i].Type == RC_CONSTANT_STATE) { |
|
|
if (constants->Constants[i].Type == RC_CONSTANT_STATE) { |
|
|
const float *data = get_shader_constant(r300, |
|
|
const float *data = get_shader_constant(r300, |
|
|
|
|
|
|
|
|
if (count == 0) |
|
|
if (count == 0) |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
BEGIN_CS(count * 4 + 3); |
|
|
|
|
|
|
|
|
BEGIN_CS(size); |
|
|
OUT_CS_REG(R500_GA_US_VECTOR_INDEX, R500_GA_US_VECTOR_INDEX_TYPE_CONST); |
|
|
OUT_CS_REG(R500_GA_US_VECTOR_INDEX, R500_GA_US_VECTOR_INDEX_TYPE_CONST); |
|
|
OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA, count * 4); |
|
|
OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA, count * 4); |
|
|
for(i = 0; i < count; ++i) { |
|
|
for(i = 0; i < count; ++i) { |
|
|
|
|
|
|
|
|
if (count == 0) |
|
|
if (count == 0) |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
BEGIN_CS(count * 7); |
|
|
|
|
|
|
|
|
BEGIN_CS(size); |
|
|
for(i = first; i < end; ++i) { |
|
|
for(i = first; i < end; ++i) { |
|
|
if (constants->Constants[i].Type == RC_CONSTANT_STATE) { |
|
|
if (constants->Constants[i].Type == RC_CONSTANT_STATE) { |
|
|
const float *data = get_shader_constant(r300, |
|
|
const float *data = get_shader_constant(r300, |
|
|
|
|
|
|
|
|
unsigned dwords = 0; |
|
|
unsigned dwords = 0; |
|
|
|
|
|
|
|
|
foreach(atom, &r300->atom_list) { |
|
|
foreach(atom, &r300->atom_list) { |
|
|
if (atom->dirty || atom->always_dirty) { |
|
|
|
|
|
|
|
|
if (atom->dirty) { |
|
|
dwords += atom->size; |
|
|
dwords += atom->size; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
struct r300_atom* atom; |
|
|
struct r300_atom* atom; |
|
|
|
|
|
|
|
|
foreach(atom, &r300->atom_list) { |
|
|
foreach(atom, &r300->atom_list) { |
|
|
if (atom->dirty || atom->always_dirty) { |
|
|
|
|
|
|
|
|
if (atom->dirty) { |
|
|
atom->emit(r300, atom->size, atom->state); |
|
|
atom->emit(r300, atom->size, atom->state); |
|
|
atom->dirty = FALSE; |
|
|
atom->dirty = FALSE; |
|
|
} |
|
|
} |