summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-12-18 12:25:53 +0000
committerEmil Velikov <[email protected]>2015-12-18 12:26:22 +0000
commit683d65dae3e673ee95d544008874edf1255e87cf (patch)
tree39775e2ec8f68177a30e25fec7954ea15d286687 /src/mesa/drivers/dri
parent147c3fbdb3f779f5172304e3be10cc27e0e67be7 (diff)
i965/state: Get rid of dword_pitch arguments to buffer functions
Cc: "11.0" <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (cherry picked from commit abb569ca18db159ae3e4c4b51d01e5a8b3215e04) [Emil Velikov: drop hunks for missing functions, drop gen7_cs_state.c] Signed-off-by: Emil Velikov <[email protected]> Conflicts: src/mesa/drivers/dri/i965/brw_context.h src/mesa/drivers/dri/i965/brw_wm_surface_state.c src/mesa/drivers/dri/i965/gen7_cs_state.c
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs_surface_state.c6
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs_surface_state.c16
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c13
5 files changed, 14 insertions, 30 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index b52bca77460..ba8e1df0466 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1776,8 +1776,7 @@ void brw_create_constant_surface(struct brw_context *brw,
drm_intel_bo *bo,
uint32_t offset,
uint32_t size,
- uint32_t *out_offset,
- bool dword_pitch);
+ uint32_t *out_offset);
void brw_update_buffer_texture_surface(struct gl_context *ctx,
unsigned unit,
uint32_t *surf_offset);
@@ -1789,8 +1788,7 @@ brw_update_sol_surface(struct brw_context *brw,
void brw_upload_ubo_surfaces(struct brw_context *brw,
struct gl_shader *shader,
struct brw_stage_state *stage_state,
- struct brw_stage_prog_data *prog_data,
- bool dword_pitch);
+ struct brw_stage_prog_data *prog_data);
void brw_upload_abo_surfaces(struct brw_context *brw,
struct gl_shader_program *prog,
struct brw_stage_state *stage_state,
diff --git a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
index 00125c0f405..2b2ed2e56f3 100644
--- a/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_gs_surface_state.c
@@ -48,11 +48,10 @@ brw_upload_gs_pull_constants(struct brw_context *brw)
/* BRW_NEW_GS_PROG_DATA */
const struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
- const bool dword_pitch = prog_data->dispatch_mode == DISPATCH_MODE_SIMD8;
/* _NEW_PROGRAM_CONSTANTS */
brw_upload_pull_constants(brw, BRW_NEW_GS_CONSTBUF, &gp->program.Base,
- stage_state, &prog_data->base, dword_pitch);
+ stage_state, &prog_data->base);
}
const struct brw_tracked_state brw_gs_pull_constants = {
@@ -79,10 +78,9 @@ brw_upload_gs_ubo_surfaces(struct brw_context *brw)
/* BRW_NEW_GS_PROG_DATA */
struct brw_vue_prog_data *prog_data = &brw->gs.prog_data->base;
- bool dword_pitch = prog_data->dispatch_mode == DISPATCH_MODE_SIMD8;
brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_GEOMETRY],
- &brw->gs.base, &prog_data->base, dword_pitch);
+ &brw->gs.base, &prog_data->base);
}
const struct brw_tracked_state brw_gs_ubo_surfaces = {
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 7bd264566ff..06183344496 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -358,8 +358,7 @@ brw_upload_pull_constants(struct brw_context *brw,
GLbitfield brw_new_constbuf,
const struct gl_program *prog,
struct brw_stage_state *stage_state,
- const struct brw_stage_prog_data *prog_data,
- bool dword_pitch);
+ const struct brw_stage_prog_data *prog_data);
/* gen7_vs_state.c */
void
diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
index f50dd712203..bb23cc80c93 100644
--- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c
@@ -53,8 +53,7 @@ brw_upload_pull_constants(struct brw_context *brw,
GLbitfield brw_new_constbuf,
const struct gl_program *prog,
struct brw_stage_state *stage_state,
- const struct brw_stage_prog_data *prog_data,
- bool dword_pitch)
+ const struct brw_stage_prog_data *prog_data)
{
unsigned i;
uint32_t surf_index = prog_data->binding_table.pull_constants_start;
@@ -94,8 +93,7 @@ brw_upload_pull_constants(struct brw_context *brw,
}
brw_create_constant_surface(brw, const_bo, const_offset, size,
- &stage_state->surf_offset[surf_index],
- dword_pitch);
+ &stage_state->surf_offset[surf_index]);
drm_intel_bo_unreference(const_bo);
brw->ctx.NewDriverState |= brw_new_constbuf;
@@ -112,7 +110,6 @@ static void
brw_upload_vs_pull_constants(struct brw_context *brw)
{
struct brw_stage_state *stage_state = &brw->vs.base;
- bool dword_pitch;
/* BRW_NEW_VERTEX_PROGRAM */
struct brw_vertex_program *vp =
@@ -121,11 +118,9 @@ brw_upload_vs_pull_constants(struct brw_context *brw)
/* BRW_NEW_VS_PROG_DATA */
const struct brw_stage_prog_data *prog_data = &brw->vs.prog_data->base.base;
- dword_pitch = brw->vs.prog_data->base.dispatch_mode == DISPATCH_MODE_SIMD8;
-
/* _NEW_PROGRAM_CONSTANTS */
brw_upload_pull_constants(brw, BRW_NEW_VS_CONSTBUF, &vp->program.Base,
- stage_state, prog_data, dword_pitch);
+ stage_state, prog_data);
}
const struct brw_tracked_state brw_vs_pull_constants = {
@@ -145,16 +140,13 @@ brw_upload_vs_ubo_surfaces(struct brw_context *brw)
/* _NEW_PROGRAM */
struct gl_shader_program *prog =
ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
- bool dword_pitch;
if (!prog)
return;
/* BRW_NEW_VS_PROG_DATA */
- dword_pitch = brw->vs.prog_data->base.dispatch_mode == DISPATCH_MODE_SIMD8;
brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_VERTEX],
- &brw->vs.base, &brw->vs.prog_data->base.base,
- dword_pitch);
+ &brw->vs.base, &brw->vs.prog_data->base.base);
}
const struct brw_tracked_state brw_vs_ubo_surfaces = {
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index e689fed9816..9c77593f65f 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -400,8 +400,7 @@ brw_create_constant_surface(struct brw_context *brw,
drm_intel_bo *bo,
uint32_t offset,
uint32_t size,
- uint32_t *out_offset,
- bool dword_pitch)
+ uint32_t *out_offset)
{
brw->vtbl.emit_buffer_surface_state(brw, out_offset, bo, offset,
BRW_SURFACEFORMAT_R32G32B32A32_FLOAT,
@@ -511,7 +510,7 @@ brw_upload_wm_pull_constants(struct brw_context *brw)
/* _NEW_PROGRAM_CONSTANTS */
brw_upload_pull_constants(brw, BRW_NEW_SURFACES, &fp->program.Base,
- stage_state, prog_data, true);
+ stage_state, prog_data);
}
const struct brw_tracked_state brw_wm_pull_constants = {
@@ -885,8 +884,7 @@ void
brw_upload_ubo_surfaces(struct brw_context *brw,
struct gl_shader *shader,
struct brw_stage_state *stage_state,
- struct brw_stage_prog_data *prog_data,
- bool dword_pitch)
+ struct brw_stage_prog_data *prog_data)
{
struct gl_context *ctx = &brw->ctx;
@@ -913,8 +911,7 @@ brw_upload_ubo_surfaces(struct brw_context *brw,
*/
brw_create_constant_surface(brw, bo, binding->Offset,
bo->size - binding->Offset,
- &surf_offsets[i],
- dword_pitch);
+ &surf_offsets[i]);
}
if (shader->NumUniformBlocks)
@@ -933,7 +930,7 @@ brw_upload_wm_ubo_surfaces(struct brw_context *brw)
/* BRW_NEW_FS_PROG_DATA */
brw_upload_ubo_surfaces(brw, prog->_LinkedShaders[MESA_SHADER_FRAGMENT],
- &brw->wm.base, &brw->wm.prog_data->base, true);
+ &brw->wm.base, &brw->wm.prog_data->base);
}
const struct brw_tracked_state brw_wm_ubo_surfaces = {