summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_gs.c
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2015-01-21 17:34:49 +0200
committerFrancisco Jerez <currojerez@riseup.net>2015-08-11 15:07:38 +0300
commit87a3e02d9bec689e110f820bba7b125b3e801fdd (patch)
treea827f109a7a6c04f02a838d79971b2d4597cf525 /src/mesa/drivers/dri/i965/brw_gs.c
parent3144844f5ca89cd5743bc9b0ac142ccf862af557 (diff)
downloadexternal_mesa3d-87a3e02d9bec689e110f820bba7b125b3e801fdd.zip
external_mesa3d-87a3e02d9bec689e110f820bba7b125b3e801fdd.tar.gz
external_mesa3d-87a3e02d9bec689e110f820bba7b125b3e801fdd.tar.bz2
i965: Define and initialize image parameter structure.
This will be used to pass image meta-data to the shader when we cannot use typed surface reads and writes. All entries except surface_idx and size are otherwise unused and will get eliminated by the uniform packing pass. size will be used for bounds checking with some image formats and will be useful for ARB_shader_image_size too. surface_idx is always used. v2: Add CS support. Move the image_params array back to brw_stage_prog_data. v3: Improve documentation. Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_gs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_gs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 9c59c8a..d1a955a 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -69,7 +69,10 @@ brw_codegen_gs_prog(struct brw_context *brw,
rzalloc_array(NULL, const gl_constant_value *, param_count);
c.prog_data.base.base.pull_param =
rzalloc_array(NULL, const gl_constant_value *, param_count);
+ c.prog_data.base.base.image_param =
+ rzalloc_array(NULL, struct brw_image_param, gs->NumImages);
c.prog_data.base.base.nr_params = param_count;
+ c.prog_data.base.base.nr_image_params = gs->NumImages;
if (brw->gen >= 7) {
if (gp->program.OutputType == GL_POINTS) {